Add possibility to install debug packages during build. (#234)
* Enabled common debug packages installation. * Update gitignore. * Make debug-packages installation disabled by default.
This commit is contained in:
parent
2b113c4175
commit
26f4c85825
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,3 +30,4 @@ dockers/docker-orchagent/Dockerfile
|
|||||||
dockers/docker-snmp-sv2/Dockerfile
|
dockers/docker-snmp-sv2/Dockerfile
|
||||||
dockers/docker-team/Dockerfile
|
dockers/docker-team/Dockerfile
|
||||||
dockers/docker-platform-monitor/Dockerfile
|
dockers/docker-platform-monitor/Dockerfile
|
||||||
|
dockers/docker-base/Dockerfile
|
||||||
|
@ -31,3 +31,6 @@ USERNAME = admin
|
|||||||
|
|
||||||
# PASSWORD - password for installer build
|
# PASSWORD - password for installer build
|
||||||
PASSWORD = YourPaSsWoRd
|
PASSWORD = YourPaSsWoRd
|
||||||
|
|
||||||
|
# SONIC_CONFIG_DEBUG - install debug packages
|
||||||
|
SONIC_CONFIG_DEBUG = n
|
||||||
|
@ -3,4 +3,12 @@
|
|||||||
DOCKER_BASE = docker-base.gz
|
DOCKER_BASE = docker-base.gz
|
||||||
$(DOCKER_BASE)_PATH = $(DOCKERS_PATH)/docker-base
|
$(DOCKER_BASE)_PATH = $(DOCKERS_PATH)/docker-base
|
||||||
|
|
||||||
SONIC_SIMPLE_DOCKER_IMAGES += $(DOCKER_BASE)
|
ifeq ($(SONIC_CONFIG_DEBUG),y)
|
||||||
|
GDB = gdb
|
||||||
|
VIM = vim
|
||||||
|
OPENSSH = openssh-client
|
||||||
|
SSHPASS = sshpass
|
||||||
|
$(DOCKER_BASE)_DBG_PACKAGES += $(GDB) $(VIM) $(OPENSSH) $(SSHPASS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_BASE)
|
||||||
|
1
slave.mk
1
slave.mk
@ -267,6 +267,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
|
|||||||
sudo mount --bind $(PYTHON_WHEELS_PATH) $($*.gz_PATH)/python-wheels $(LOG)
|
sudo mount --bind $(PYTHON_WHEELS_PATH) $($*.gz_PATH)/python-wheels $(LOG)
|
||||||
# Export variables for j2. Use path for unique variable names, e.g. docker_orchagent_debs
|
# Export variables for j2. Use path for unique variable names, e.g. docker_orchagent_debs
|
||||||
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_debs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DEPENDS),RDEPENDS))\n" | awk '!a[$$0]++'))
|
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_debs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DEPENDS),RDEPENDS))\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
|
j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile
|
||||||
docker build --no-cache -t $* $($*.gz_PATH) $(LOG)
|
docker build --no-cache -t $* $($*.gz_PATH) $(LOG)
|
||||||
docker save $* | gzip -c > $@
|
docker save $* | gzip -c > $@
|
||||||
|
Loading…
Reference in New Issue
Block a user