2018-10-09 15:30:18 +02:00
|
|
|
FROM php:7-apache
|
2017-06-13 10:14:58 +02:00
|
|
|
|
2018-11-06 11:10:04 +01:00
|
|
|
ENV HUGO_VERSION 0.50
|
2017-06-13 11:35:25 +02:00
|
|
|
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.deb
|
2017-06-13 10:52:59 +02:00
|
|
|
|
2017-06-13 10:38:29 +02:00
|
|
|
RUN apt-get update && apt-get upgrade -y && \
|
2018-10-09 15:24:26 +02:00
|
|
|
apt-get install -y git
|
2017-06-13 11:01:15 +02:00
|
|
|
|
2017-06-19 23:06:51 +02:00
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
2017-06-13 11:35:25 +02:00
|
|
|
ADD https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp/hugo.deb
|
2018-10-09 14:44:39 +02:00
|
|
|
RUN dpkg -i /tmp/hugo.deb && \
|
|
|
|
rm /tmp/hugo.deb
|
2017-06-13 11:35:25 +02:00
|
|
|
|
2018-10-09 14:44:39 +02:00
|
|
|
RUN mkdir -p /usr/share/blog
|
|
|
|
|
|
|
|
COPY . /tmp/pmpc-build/
|
|
|
|
|
|
|
|
WORKDIR /tmp/pmpc-build/site/
|
|
|
|
|
|
|
|
RUN build/build.sh && \
|
|
|
|
cp -r public/ /usr/share/blog/public/ && \
|
|
|
|
cd / && rm -rf /tmp/pmpc-build
|
2017-06-13 11:23:58 +02:00
|
|
|
|
2017-06-19 22:35:41 +02:00
|
|
|
COPY 000-default.conf /etc/apache2/sites-enabled/
|
2017-06-15 14:19:52 +02:00
|
|
|
|
2018-10-09 14:44:39 +02:00
|
|
|
CMD apache2-foreground
|