Skip to content

Commit

Permalink
Mirror APT repo
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Nov 26, 2017
0 parents commit 89628eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM debian:stretch-slim

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -q -y update \
&& apt-get -y --no-install-recommends install \
apt-mirror \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
11 changes: 11 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# vim: ts=2 sw=2 sts=2 et

set -e
set -u

for repo_url in "$@"; do
curl -s -o /etc/apt/mirror.list "$repo_url"
apt-mirror
rm -f /etc/apt/mirror.list
done

0 comments on commit 89628eb

Please sign in to comment.