multi stage build

This commit is contained in:
2020-02-12 15:56:29 +01:00
parent 7254e8900f
commit ae4b053b69
5 changed files with 218 additions and 26 deletions

View File

@ -4,6 +4,7 @@ cd "${0%/*}/.."
source ./config/config.sh
export PROP_SERVER_KEY=$(cat ./config/id_rsa)
docker build \
export UI_MODE=cli
docker build --build-arg UI_MODE \
--build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER_KEY \
--build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:latest-$(arch) .
--build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:$UI_MODE-latest-$(arch) .

View File

@ -1,8 +1,11 @@
#!/bin/bash
docker tag registry.chrz.de:443/move2docker:cli-latest-$(arch) registry.chrz.de:443/move2docker:latest-$(arch)
docker push registry.chrz.de:443/move2docker:cli-latest-$(arch)
docker push registry.chrz.de:443/move2docker:gui-latest-$(arch)
docker push registry.chrz.de:443/move2docker:latest-$(arch)
docker manifest create registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 registry.chrz.de:443/move2docker:latest-armv7l
docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 --os linux --arch amd64
docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-armv7l --os linux --arch armv7
docker manifest push registry.chrz.de:443/move2docker:latest --purge
# docker manifest create registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 registry.chrz.de:443/move2docker:latest-armv7l
# docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 --os linux --arch amd64
# docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-armv7l --os linux --arch armv7
# docker manifest push registry.chrz.de:443/move2docker:latest --purge