docker-ubuntumirror/Dockerfile
sneak 96f723f82b
All checks were successful
continuous-integration/drone/push Build is passing
Update 'Dockerfile'
2020-02-15 17:44:17 +00:00

35 lines
1.1 KiB
Docker

FROM phusion/baseimage:0.11
VOLUME /var/mirror
ENV MIRROR_ARCHITECTURES "amd64"
ENV SOURCE_MIRROR ""
ENV MIRROR_CATEGORIES main,universe,restricted,multiverse
ENV UBUNTU_MIRROR_SOURCE archive.ubuntu.com
ENV UBUNTU_MIRROR_PROJECTS bionic,bionic-updates,bionic-security,bionic-backports,focal,focal-updates,focal-security,focal-backports
ADD ./sources.list /etc/apt/sources.list
RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
# phusion baseimage says i'm not supposed to do this
# and i don't care:
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y run-one nginx make debmirror xz-utils
ADD ./mirror /opt/mirror
ADD ./mirror.run /etc/service/mirror/run
ADD nginx.conf /etc/nginx/nginx.conf
ADD ./nginx.run /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run && \
chmod +x /etc/service/mirror/run
RUN \
export GNUPGHOME=/etc/debmirror/ubuntu && \
mkdir -p $GNUPGHOME && \
chmod go-rwx $GNUPGHOME && \
gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg && \
cp $GNUPGHOME/pubring.kbx $GNUPGHOME/trustedkeys.kbx
EXPOSE 80