Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine SED_DPKG: install dependencies from apt source #126

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions dockers/docker-database/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ RUN apt-get update

COPY deps/ deps

## Install redis-tools dependencies
## TODO: implicitly install dependencies
RUN apt-get -y install libjemalloc1

SED_DPKG

## Clean up
Expand Down
4 changes: 0 additions & 4 deletions dockers/docker-orchagent/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ RUN apt-get update

RUN apt-get install -f -y ifupdown bridge-utils libdbus-1-3 libdaemon0 libjansson4

## Install redis-tools dependencies
## TODO: implicitly install dependencies
RUN apt-get -y install libjemalloc1

COPY deps /deps

SED_DPKG
Expand Down
2 changes: 1 addition & 1 deletion slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
mkdir -p $($*.gz_PATH)/python-wheels $(LOG)
sudo mount --bind $(DEBS_PATH) $($*.gz_PATH)/deps $(LOG)
sudo mount --bind $(PYTHON_WHEELS_PATH) $($*.gz_PATH)/python-wheels $(LOG)
sed 's/SED_DPKG/RUN cd deps \&\& dpkg -i $(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DEPENDS),RDEPENDS))\n" | awk '!a[$$0]++')/g' $($*.gz_PATH)/Dockerfile.template > $($*.gz_PATH)/Dockerfile
sed 's/SED_DPKG/RUN cd deps \&\& dpkg -i $(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DEPENDS),RDEPENDS))\n" | awk '!a[$$0]++') || { o=$$(apt-get -y install -f | tee \/dev\/tty); !(echo $$o | grep "The following packages will be REMOVED:"); }/g' $($*.gz_PATH)/Dockerfile.template > $($*.gz_PATH)/Dockerfile
docker build --no-cache -t $* $($*.gz_PATH) $(LOG)
docker save $* | gzip -c > $@
$(FOOTER)
Expand Down