Skip to content

Commit

Permalink
feat: build multiarch images (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali authored Jan 16, 2024
1 parent c3abd28 commit 5fb04fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions images/base/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN apt-get update && \
curl \
docker-ce \
docker-ce-cli \
docker-buildx-plugin \
docker-compose-plugin \
htop \
locales \
Expand Down
2 changes: 1 addition & 1 deletion images/base/docker.list
Original file line number Diff line number Diff line change
@@ -1 +1 @@
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable
deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable
3 changes: 2 additions & 1 deletion scripts/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source "./lib.sh"

check_dependencies \
docker
depot

source "./images.sh"

Expand Down Expand Up @@ -100,7 +101,7 @@ for image in "${IMAGES[@]}"; do
continue
fi

run_trace $DRY_RUN depot build --project "gb3p8xrshk" --load \
run_trace $DRY_RUN depot build --project "gb3p8xrshk" --load --platform linux/arm64,linux/amd64,linux/arm/v7 --save --metadata-file=build.json \
"${docker_flags[@]}" \
"$image_dir" \
--file="$image_path" \
Expand Down
6 changes: 3 additions & 3 deletions scripts/push_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source "./lib.sh"

check_dependencies \
docker
depot

source "./images.sh"

Expand Down Expand Up @@ -100,7 +101,6 @@ for image in "${IMAGES[@]}"; do
continue
fi

run_trace $DRY_RUN docker push \
"${docker_flags[@]}" \
"$image_ref" \| indent
build_id=$(cat build.json | jq -r .\[\"depot.build\"\].buildID)
run_trace $DRY_RUN depot push --project "gb3p8xrshk" "$build_id"
done

0 comments on commit 5fb04fd

Please sign in to comment.