Update Dockerfile

This commit is contained in:
kongkrit 2020-01-02 16:07:38 +07:00 committed by GitHub
parent a8959243a8
commit e1fccb39b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 9 deletions

View File

@ -1,17 +1,34 @@
FROM ubuntu:18.04
MAINTAINER Terry Chen <seterrychen@gmail.com>
RUN \
apt update && \
apt install -y apt-mirror apache2 && \
apt autoremove -y && apt clean
ENV DEBIAN_FRONTEND noninteractive
ENV RESYNC_PERIOD 12h
ENV TIMEOUT 12h
#ENV REFRESH_HOURS 4
ENV MIRROR_URL http://archive.ubuntu.com/ubuntu
#ENV APACHE_RUN_DIR /var/www/html
RUN apt-get update \
&& apt-get install --no-install-recommends -y apt-mirror apache2 \
&& mv /etc/apt/mirror.list / \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/*
# mv /etc/apt/mirror.list / && \
# rm -rf /var/lib/apt/lists/*
# RUN mkdir -p /var/www/html/ubuntu
RUN mkdir -p /var/www/html/ubuntu
RUN rm -f /var/run/apache2/apache2.pid
EXPOSE 80
COPY setup.sh /setup.sh
VOLUME ["/var/spool/apt-mirror"]
COPY setup.sh /setup.sh
#CMD ["service", "apache2", "start"]
#RUN service apache2 start
#EXPOSE 80
#VOLUME ["/etc/apt", "/var/spool/apt-mirror"]
#CMD ["/bin/bash", "setup.sh"]
#CMD ["/bin/bash"]
VOLUME ["/var/www/html/ubuntu"]
CMD ["/bin/bash", "setup.sh"]