Skip to content

Commit

Permalink
ci: simplify the script/package to speed up local development
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Yu <jack.yu@suse.com>
  • Loading branch information
Yu-Jack committed Apr 18, 2024
1 parent 8a2158d commit 920b34e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
3 changes: 3 additions & 0 deletions package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1.7.0

FROM registry.suse.com/bci/bci-base:15.5

ARG TARGETPLATFORM

RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/arm64" ]; then \
echo "Error: Unsupported TARGETPLATFORM: $TARGETPLATFORM" && \
exit 1; \
Expand Down
13 changes: 0 additions & 13 deletions scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ cp bin/* dist/artifacts
IMAGE=${REPO}/support-bundle-kit:${TAG}
DOCKERFILE=package/Dockerfile

docker run --privileged --rm tonistiigi/binfmt --install all
buildx create --platform linux/amd64,linux/arm64 --use
buildx ls

# In old docker version, it doesn't support multiple values in --platform with --load.
# So we only load image with current platform.
# Ref: https://github.com/docker/buildx/issues/59#issuecomment-616050491

# build
buildx build --platform linux/amd64,linux/arm64 \
-f ${DOCKERFILE} -t ${IMAGE} .

# test
buildx build --load \
-f ${DOCKERFILE} -t ${IMAGE} .

Expand Down

0 comments on commit 920b34e

Please sign in to comment.