From e26043ac3cef6e94581ff195c00d343f6a84bae4 Mon Sep 17 00:00:00 2001 From: lguohan Date: Wed, 5 Sep 2018 15:28:32 -0700 Subject: [PATCH] [build]: use vfs storage driver to build dockers (#2016) seen issues to build dockers using aufs in ubuntu 18.04 Immedidate dockers are exported to docker file and then imported into sonic image. Thus, whether using vfs or aufs as the storage driver does not matter for the immediate build. Signed-off-by: Guohan Lu --- slave.mk | 2 ++ sonic-slave/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index 803b87aaff..efbf3d2e0b 100644 --- a/slave.mk +++ b/slave.mk @@ -358,6 +358,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g $(HEADER) # Apply series of patches if exist if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && QUILT_PATCHES=../$(notdir $($*.gz_PATH)).patch quilt push -a; popd; fi + docker info $(LOG) docker build --squash --no-cache \ --build-arg http_proxy=$(HTTP_PROXY) \ --build-arg https_proxy=$(HTTPS_PROXY) \ @@ -388,6 +389,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_whls=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_WHEELS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile + docker info $(LOG) docker build --squash --no-cache \ --build-arg http_proxy=$(HTTP_PROXY) \ --build-arg https_proxy=$(HTTPS_PROXY) \ diff --git a/sonic-slave/Dockerfile b/sonic-slave/Dockerfile index 803fabcfb1..35e73e3e30 100644 --- a/sonic-slave/Dockerfile +++ b/sonic-slave/Dockerfile @@ -288,4 +288,4 @@ RUN add-apt-repository \ stable" RUN apt-get update RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie -RUN echo "DOCKER_OPTS=\"--experimental\"" >> /etc/default/docker +RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker