[build]: Upgrade docker to 18.09 in stretch slave (#3049)
Also add an option to use docker buildkit for image build Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
This commit is contained in:
parent
69b8ad7be0
commit
1bcd54d38c
@ -117,6 +117,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
|||||||
PASSWORD=$(PASSWORD) \
|
PASSWORD=$(PASSWORD) \
|
||||||
USERNAME=$(USERNAME) \
|
USERNAME=$(USERNAME) \
|
||||||
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
|
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
|
||||||
|
SONIC_USE_DOCKER_BUILDKIT=$(SONIC_USE_DOCKER_BUILDKIT) \
|
||||||
VS_PREPARE_MEM=$(VS_PREPARE_MEM) \
|
VS_PREPARE_MEM=$(VS_PREPARE_MEM) \
|
||||||
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
|
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
|
||||||
HTTP_PROXY=$(http_proxy) \
|
HTTP_PROXY=$(http_proxy) \
|
||||||
|
@ -16,6 +16,14 @@ SONIC_CONFIG_BUILD_JOBS = 1
|
|||||||
# Corresponding -j argument will be passed to make/dpkg commands that build separate packages
|
# Corresponding -j argument will be passed to make/dpkg commands that build separate packages
|
||||||
SONIC_CONFIG_MAKE_JOBS = $(shell nproc)
|
SONIC_CONFIG_MAKE_JOBS = $(shell nproc)
|
||||||
|
|
||||||
|
# SONIC_USE_DOCKER_BUILDKIT - use docker buildkit for build.
|
||||||
|
# If set to y SONiC build system will set environment variable DOCKER_BUILDKIT=1
|
||||||
|
# to enable docker buildkit.
|
||||||
|
# This options will speed up docker image build time.
|
||||||
|
# NOTE: SONIC_USE_DOCKER_BUILDKIT will produce larger installable SONiC image
|
||||||
|
# because of a docker bug (more details: https://github.com/moby/moby/issues/38903)
|
||||||
|
# SONIC_USE_DOCKER_BUILDKIT = y
|
||||||
|
|
||||||
# SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD - use native dockerd for build.
|
# SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD - use native dockerd for build.
|
||||||
# If set to y SONiC build container will use native dockerd instead of dind for faster build
|
# If set to y SONiC build container will use native dockerd instead of dind for faster build
|
||||||
# SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD = y
|
# SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD = y
|
||||||
|
7
slave.mk
7
slave.mk
@ -151,6 +151,7 @@ $(info "CONFIGURED_PLATFORM" : "$(if $(PLATFORM),$(PLATFORM),$(CONFI
|
|||||||
$(info "SONIC_CONFIG_PRINT_DEPENDENCIES" : "$(SONIC_CONFIG_PRINT_DEPENDENCIES)")
|
$(info "SONIC_CONFIG_PRINT_DEPENDENCIES" : "$(SONIC_CONFIG_PRINT_DEPENDENCIES)")
|
||||||
$(info "SONIC_BUILD_JOBS" : "$(SONIC_BUILD_JOBS)")
|
$(info "SONIC_BUILD_JOBS" : "$(SONIC_BUILD_JOBS)")
|
||||||
$(info "SONIC_CONFIG_MAKE_JOBS" : "$(SONIC_CONFIG_MAKE_JOBS)")
|
$(info "SONIC_CONFIG_MAKE_JOBS" : "$(SONIC_CONFIG_MAKE_JOBS)")
|
||||||
|
$(info "SONIC_USE_DOCKER_BUILDKIT" : "$(SONIC_USE_DOCKER_BUILDKIT)")
|
||||||
$(info "USERNAME" : "$(USERNAME)")
|
$(info "USERNAME" : "$(USERNAME)")
|
||||||
$(info "PASSWORD" : "$(PASSWORD)")
|
$(info "PASSWORD" : "$(PASSWORD)")
|
||||||
$(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)")
|
$(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)")
|
||||||
@ -175,6 +176,12 @@ $(info "BLDENV" : "$(BLDENV)")
|
|||||||
$(info "VS_PREPARE_MEM" : "$(VS_PREPARE_MEM)")
|
$(info "VS_PREPARE_MEM" : "$(VS_PREPARE_MEM)")
|
||||||
$(info )
|
$(info )
|
||||||
|
|
||||||
|
ifeq ($(SONIC_USE_DOCKER_BUILDKIT),y)
|
||||||
|
$(warning "Using SONIC_USE_DOCKER_BUILDKIT will produce larger installable SONiC image because of a docker bug (more details: https://github.com/moby/moby/issues/38903)")
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Generic rules section
|
## Generic rules section
|
||||||
## All rules must go after includes for propper targets expansion
|
## All rules must go after includes for propper targets expansion
|
||||||
|
@ -326,5 +326,5 @@ RUN add-apt-repository \
|
|||||||
$(lsb_release -cs) \
|
$(lsb_release -cs) \
|
||||||
stable"
|
stable"
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-stretch
|
RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-stretch
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
||||||
|
Loading…
Reference in New Issue
Block a user