[docker-restapi]: Avoid building RestAPI docker by default (#4018)
Provide build option for RESTAPI docker
This commit is contained in:
parent
918fdc6c44
commit
ebb07d9942
@ -177,6 +177,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
|||||||
HTTP_PROXY=$(http_proxy) \
|
HTTP_PROXY=$(http_proxy) \
|
||||||
HTTPS_PROXY=$(https_proxy) \
|
HTTPS_PROXY=$(https_proxy) \
|
||||||
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
|
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
|
||||||
|
SONIC_ENABLE_RESTAPI=$(ENABLE_RESTAPI) \
|
||||||
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
|
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
|
||||||
$(SONIC_OVERRIDE_BUILD_VARS)
|
$(SONIC_OVERRIDE_BUILD_VARS)
|
||||||
|
|
||||||
|
@ -104,3 +104,6 @@ ENABLE_SFLOW = y
|
|||||||
|
|
||||||
# ENABLE_MGMT_FRAMEWORK - build docker-sonic-mgt-framework for CLI and REST server support
|
# ENABLE_MGMT_FRAMEWORK - build docker-sonic-mgt-framework for CLI and REST server support
|
||||||
ENABLE_MGMT_FRAMEWORK = y
|
ENABLE_MGMT_FRAMEWORK = y
|
||||||
|
|
||||||
|
# ENABLE_RESTAPI - build docker-sonic-restapi for configuring the switch using REST APIs
|
||||||
|
ENABLE_RESTAPI = n
|
||||||
|
@ -10,9 +10,11 @@ $(DOCKER_RESTAPI)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_STEM)
|
|||||||
|
|
||||||
$(DOCKER_RESTAPI)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
$(DOCKER_RESTAPI)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_RESTAPI), y)
|
||||||
SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI)
|
SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI)
|
||||||
SONIC_STRETCH_DOCKERS += $(DOCKER_RESTAPI)
|
SONIC_STRETCH_DOCKERS += $(DOCKER_RESTAPI)
|
||||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_RESTAPI)
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_RESTAPI)
|
||||||
|
endif
|
||||||
|
|
||||||
$(DOCKER_RESTAPI)_CONTAINER_NAME = rest-api
|
$(DOCKER_RESTAPI)_CONTAINER_NAME = rest-api
|
||||||
$(DOCKER_RESTAPI)_RUN_OPT += --cap-add NET_ADMIN --privileged -t
|
$(DOCKER_RESTAPI)_RUN_OPT += --cap-add NET_ADMIN --privileged -t
|
||||||
|
6
slave.mk
6
slave.mk
@ -100,6 +100,10 @@ ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
|
|||||||
ENABLE_SYSTEM_TELEMETRY = N
|
ENABLE_SYSTEM_TELEMETRY = N
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SONIC_ENABLE_RESTAPI),y)
|
||||||
|
ENABLE_RESTAPI = y
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(SONIC_ENABLE_SYNCD_RPC),y)
|
ifeq ($(SONIC_ENABLE_SYNCD_RPC),y)
|
||||||
ENABLE_SYNCD_RPC = y
|
ENABLE_SYNCD_RPC = y
|
||||||
endif
|
endif
|
||||||
@ -190,6 +194,7 @@ $(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)")
|
|||||||
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
|
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
|
||||||
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
||||||
$(info "ENABLE_SYSTEM_TELEMETRY" : "$(ENABLE_SYSTEM_TELEMETRY)")
|
$(info "ENABLE_SYSTEM_TELEMETRY" : "$(ENABLE_SYSTEM_TELEMETRY)")
|
||||||
|
$(info "ENABLE_RESTAPI" : "$(ENABLE_RESTAPI)")
|
||||||
$(info "ENABLE_ZTP" : "$(ENABLE_ZTP)")
|
$(info "ENABLE_ZTP" : "$(ENABLE_ZTP)")
|
||||||
$(info "SONIC_DEBUGGING_ON" : "$(SONIC_DEBUGGING_ON)")
|
$(info "SONIC_DEBUGGING_ON" : "$(SONIC_DEBUGGING_ON)")
|
||||||
$(info "SONIC_PROFILING_ON" : "$(SONIC_PROFILING_ON)")
|
$(info "SONIC_PROFILING_ON" : "$(SONIC_PROFILING_ON)")
|
||||||
@ -643,6 +648,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
|||||||
export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)"
|
export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)"
|
||||||
export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)"
|
export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)"
|
||||||
export enable_system_telemetry="$(ENABLE_SYSTEM_TELEMETRY)"
|
export enable_system_telemetry="$(ENABLE_SYSTEM_TELEMETRY)"
|
||||||
|
export enable_restapi="$(ENABLE_RESTAPI)"
|
||||||
export enable_ztp="$(ENABLE_ZTP)"
|
export enable_ztp="$(ENABLE_ZTP)"
|
||||||
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
||||||
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
|
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
|
||||||
|
Loading…
Reference in New Issue
Block a user