Skip to content

Commit

Permalink
Made "deploy-image" Makefile's target push a multi arch image.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-zaroda committed Aug 13, 2024
1 parent 9a7266a commit 1fdd62f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ DIST_BIN_PATH = ${DIST_PATH}/bin
DRAKY_BIN_PATH = ${DIST_BIN_PATH}/draky
TESTS_PATH = ${ROOT}/tests

PLATFORMS=linux/arm64,linux/amd64

# Version processed.
VER = $(shell echo ${VERSION} | sed 's/^v//g')

Expand Down Expand Up @@ -93,6 +95,10 @@ cleanup:
deploy-image:
if [ "${VERSION}" == "${VERSION_DEFAULT}" ]; then \
echo "Cannot deploy the '${VERSION_DEFAULT}' version"; \
else \
docker push ${NAME}:${VER}; \
exit; \
fi;
[ ! -d "${DIST_PATH}" ] || rm -r ${DIST_PATH}
mkdir -p ${DIST_BIN_PATH}
docker buildx create --use --name docker-container
docker buildx build -f ${ROOT}/Dockerfile --provenance=false --rm --platform ${PLATFORMS} -t ${NAME}:${VER} --output "type=registry" .
docker buildx rm docker-container

0 comments on commit 1fdd62f

Please sign in to comment.