35 lines
1.1 KiB
Docker
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
|