Skip to content

Commit

Permalink
Fix docker image cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Aug 16, 2024
1 parent 099e2ec commit bfcfe67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ osd_docker: /opt/qemu/bin
if ! ls /proc/sys/fs/binfmt_misc | grep -q qemu ; then sudo ./docker/qemu-binfmt-conf.sh --qemu-path /opt/qemu/bin --persistent yes; fi
TAG="wfb-ng-osg:build-`date +%s`"; docker build -t $$TAG docker --build-arg SRC_IMAGE=$(DOCKER_SRC_IMAGE) && \
docker run -i --rm -v $(PWD):/build $$TAG bash -c "trap 'chown -R --reference=. .' EXIT; export VERSION=$(VERSION) COMMIT=$(COMMIT) SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) && cd /build && make clean && make osd mode=$(mode)"
docker image ls -q "wfb-ng-osd:build-*" | tail -n+5 | while read i ; do docker rmi $$i; done
docker image ls -q "wfb-ng-osd:build-*" | uniq | tail -n+6 | while read i ; do docker rmi -f $$i; done

clean:
rm -f osd *.o *~
Expand Down

0 comments on commit bfcfe67

Please sign in to comment.