From be9f3ad7c1aabcb1aecfd8212b1acbee5c9581e0 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 4f1998680b..c0e2272671 100644 --- a/slave.mk +++ b/slave.mk @@ -385,6 +385,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) \ @@ -416,6 +417,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 961df459d0..32218b44d1 100644 --- a/sonic-slave/Dockerfile +++ b/sonic-slave/Dockerfile @@ -298,4 +298,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