51 lines
1.6 KiB
Docker
51 lines
1.6 KiB
Docker
FROM cloudron/base:1.0.0
|
|
|
|
RUN mkdir -p /app/code
|
|
WORKDIR /app/code
|
|
|
|
RUN wget http://nginx.org/keys/nginx_signing.key && \
|
|
apt-key add nginx_signing.key && \
|
|
rm nginx_signing.key && \
|
|
echo "deb http://nginx.org/packages/mainline/ubuntu/ $(lsb_release -cs) nginx" > /etc/apt/sources.list.d/nginx.list && \
|
|
apt update && \
|
|
apt install -y nginx zopfli
|
|
|
|
ENV RUST=1.47.0
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST} && \
|
|
export PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && \
|
|
cd /tmp && \
|
|
git clone https://github.com/getzola/zola.git && \
|
|
cd zola && \
|
|
cargo build --release && \
|
|
cp target/release/zola /usr/bin && \
|
|
cd / && rm -rf /tmp/zola /root/.cargo /root/.rustup
|
|
|
|
ADD supervisord.conf /etc/supervisor/conf.d/zola.conf
|
|
RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
|
|
|
|
ADD nginx.conf /app/code/nginx.conf.default
|
|
ADD fpm.conf /etc/php/7.2/fpm/php-fpm.conf
|
|
|
|
ADD public /app/code/public.default
|
|
|
|
ADD start.sh /app/code/start.sh
|
|
ADD config.sh /app/code/config.sh.default
|
|
ADD rebuild.sh /app/code/rebuild.sh
|
|
ADD rebuild-loop.sh /app/code/rebuild-loop.sh
|
|
ADD rebuild.php /app/code/rebuild.php
|
|
ADD ssh.config /app/code/ssh.config.default
|
|
|
|
RUN mkdir /run/nginx && \
|
|
rm /var/log/nginx/*.log && \
|
|
ln -s /dev/stderr /var/log/nginx/error.log && \
|
|
ln -s /dev/stdout /var/log/nginx/access.log && \
|
|
rmdir /var/cache/nginx && ln -s /tmp /var/cache/nginx && \
|
|
ln -s /app/data/ssh /home/cloudron/.ssh
|
|
|
|
RUN chown -R cloudron:cloudron /app/code /run/nginx
|
|
|
|
WORKDIR /app/data
|
|
|
|
CMD [ "/app/code/start.sh" ]
|
|
|