Skip to content

Commit

Permalink
fix builds with new builder docker/buildx#138
Browse files Browse the repository at this point in the history
Signed-off-by: Sandor Szücs <[email protected]>
  • Loading branch information
szuecs committed Apr 8, 2020
1 parent a192a7d commit bf7c499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline:
- desc: build-push
cmd: |
apt-get update -o Acquire::http::AllowRedirect=false
apt-get install -o Acquire::http::AllowRedirect=false -y bzr redis-server jq
apt-get install -o Acquire::http::AllowRedirect=false -y bzr redis-server jq qemu-user-static
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
LATEST_VERSION=$(git describe --tags --always | awk -F \- '{print $1}')
CUR_PART=$(echo $LATEST_VERSION | awk -F . '{print $1"."$2}')
Expand All @@ -27,6 +27,7 @@ pipeline:
git status
git diff
cd packaging && make docker.build.amd64 && git status && git diff && make docker.push.amd64
make docker.build.arm64 # test buildx
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
echo "Created docker image registry.opensource.zalan.do/pathfinder/skipper:${RELEASE_VERSION}"
echo "Creating docker image registry.opensource.zalan.do/pathfinder/skipper-arm64:${RELEASE_VERSION}"
Expand Down
5 changes: 5 additions & 0 deletions packaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ docker.push.armv7: docker.build.armv7
# https://docs.docker.com/build/working-with-build/
# ~/.docker/config.json add: "experimental": "enabled",
docker.build.enable:
[ $$(which qemu-user-static) ] || echo "please install qemu-user-static"
[ $$(which jq) ] || echo "please install jq"
[ -d $$HOME/.docker ] || mkdir $$HOME/.docker
[ -f $$HOME/.docker/config.json ] || touch $$HOME/.docker/config.json
if [ -s $$HOME/.docker/config.json ]; then jq -r '. += {experimental: "enabled"}' $$HOME/.docker/config.json > $$HOME/.docker/config.json.new; mv $$HOME/.docker/config.json.new $$HOME/.docker/config.json; else echo '{"experimental": "enabled"}' >$$HOME/.docker/config.json; fi
docker buildx create skipper
docker buildx use skipper
docker buildx inspect --bootstrap
docker buildx ls

build.linux: $(SOURCES) build.linux.amd64 build.linux.arm64 build.linux.armv7

Expand Down

0 comments on commit bf7c499

Please sign in to comment.