From 39922220b0fe1f04504f6f68a0aa7df1fd719077 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 20 Jun 2017 15:26:30 +1000 Subject: [PATCH 1/3] Merge pull request #1930 from SvenDowideit/use-engine-registry-mirror Use engine registry mirror (cherry picked from commit 1e3cd14af726c61a3d98a042f242e8e123bc4e51) --- scripts/run-common | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-common b/scripts/run-common index 62b7475e..d4f45093 100755 --- a/scripts/run-common +++ b/scripts/run-common @@ -48,4 +48,8 @@ REBUILD=1 QEMUARCH=${qemuarch["${ARCH}"]} TTYCONS=${ttycons["${ARCH}"]} -DEFAULT_KERNEL_ARGS="printk.devkmsg=on rancher.debug=true rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS}" +if [ "$ENGINE_REGISTRY_MIRROR" != "" ]; then + REGISTRY_MIRROR="rancher.bootstrap_docker.registry_mirror=${ENGINE_REGISTRY_MIRROR} rancher.system_docker.registry_mirror=${ENGINE_REGISTRY_MIRROR} rancher.docker.registry_mirror=${ENGINE_REGISTRY_MIRROR}" +fi + +DEFAULT_KERNEL_ARGS="printk.devkmsg=on rancher.debug=true rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS} ${REGISTRY_MIRROR} " From cc133372a7e6c907bf6bd0def581fea4f85f8e70 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 15 Jun 2017 15:55:30 +1000 Subject: [PATCH 2/3] Merge pull request #1920 from SvenDowideit/add-apt-cache-build-arg Add apt-cacher build arg (cherry picked from commit 26939ebb7eddf3b8fa502d4a43697479befccaa1) --- Dockerfile.dapper | 11 ++++++++--- scripts/installer/kexec/Dockerfile.dapper | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 6a7a2350..fd4ce621 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,8 +1,13 @@ FROM ubuntu:16.04 # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +# get the apt-cacher proxy set +ARG APTPROXY= + +RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01proxy \ + && cat /etc/apt/apt.conf.d/01proxy \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ cpio \ @@ -32,7 +37,7 @@ RUN apt-get update && \ ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /go/src/github.com/rancher/os ENV DAPPER_OUTPUT ./bin ./dist ./build/initrd ./build/kernel diff --git a/scripts/installer/kexec/Dockerfile.dapper b/scripts/installer/kexec/Dockerfile.dapper index a60d39f7..49ad5889 100644 --- a/scripts/installer/kexec/Dockerfile.dapper +++ b/scripts/installer/kexec/Dockerfile.dapper @@ -1,8 +1,12 @@ FROM ubuntu:16.04 # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 +# get the apt-cacher proxy set +ARG APTPROXY= -RUN apt-get update \ +RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01proxy \ + && cat /etc/apt/apt.conf.d/01proxy \ + && apt-get update \ && apt-get install -yq build-essential autoconf libtool gawk alien fakeroot \ zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libdevmapper-dev \ module-init-tools \ @@ -30,7 +34,7 @@ RUN mkdir -p /source/dist \ ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST APTPROXY #ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /source ENV DAPPER_OUTPUT ./dist From 8d894ba3963e63b4822e1de9611dbcea32ae414e Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 22 Jun 2017 10:15:45 +1000 Subject: [PATCH 3/3] use the registry mirror for integration tests too Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index fd4ce621..a4e24842 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -37,7 +37,7 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY ENGINE_REGISTRY_MIRROR ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /go/src/github.com/rancher/os ENV DAPPER_OUTPUT ./bin ./dist ./build/initrd ./build/kernel