summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Volkov <av903u@att.com>2018-10-19 19:24:46 +0000
committerAndrey Volkov <av903u@att.com>2018-10-23 14:51:05 -0700
commit0d119b55b149d985510fdc6f3e2f691266537e84 (patch)
treed67b42813a743ceff21310103348eec282b4835b
parent5f2940f5752e7126f82355382a57a806dded5eb3 (diff)
MODE as docker build arg
-rw-r--r--Dockerfile3
-rwxr-xr-xassets/update_mirror_ubuntu.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 7fc4875..4dae941 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -55,6 +55,9 @@ ENV EMAIL_ADDRESS="youremail@example.com"
55ENV GPG_PASSWORD="PickAPassword" 55ENV GPG_PASSWORD="PickAPassword"
56ENV HOSTNAME=localhost 56ENV HOSTNAME=localhost
57 57
58ARG MODE=packages
59ENV MODE ${MODE}
60
58COPY assets/packages /opt/packages 61COPY assets/packages /opt/packages
59 62
60RUN /opt/startup.sh 63RUN /opt/startup.sh
diff --git a/assets/update_mirror_ubuntu.sh b/assets/update_mirror_ubuntu.sh
index 330344f..72d8212 100755
--- a/assets/update_mirror_ubuntu.sh
+++ b/assets/update_mirror_ubuntu.sh
@@ -15,7 +15,7 @@ UBUNTU_RELEASE=xenial
15UPSTREAM_URL="http://archive.ubuntu.com/ubuntu/" 15UPSTREAM_URL="http://archive.ubuntu.com/ubuntu/"
16COMPONENTS=( main universe ) 16COMPONENTS=( main universe )
17REPOS=( ${UBUNTU_RELEASE} ${UBUNTU_RELEASE}-updates ${UBUNTU_RELEASE}-security ) 17REPOS=( ${UBUNTU_RELEASE} ${UBUNTU_RELEASE}-updates ${UBUNTU_RELEASE}-security )
18MODE='packages' # packages - mirror specified packages or all 18
19if [ "$MODE" = "packages" ]; then 19if [ "$MODE" = "packages" ]; then
20 FILTER_OPTS=(-filter="$(cat /opt/packages | paste -sd \| -)" -filter-with-deps) 20 FILTER_OPTS=(-filter="$(cat /opt/packages | paste -sd \| -)" -filter-with-deps)
21else 21else