Skip to content

Commit

Permalink
fix(arm64): s/BUILDPLATFORM/TARGETPLATFORM/g
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic committed Jul 28, 2022
1 parent bae728e commit 648d71b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ BUILDX_INFO ?= $(shell docker buildx 2>&1 >/dev/null; echo $?)
DOCKER_LABELS?=--label org.opencontainers.image.version=$(KONG_VERSION) --label org.opencontainers.image.created=`date -u +'%Y-%m-%dT%H:%M:%SZ'` --label org.opencontainers.image.revision=$(KONG_SHA)

ifeq ($(BUILDX),false)
DOCKER_COMMAND?=docker build --progress=$(DOCKER_BUILD_PROGRESS) $(KONG_EE_PORTS_FLAG) --build-arg BUILDPLATFORM=x/amd64 $(DOCKER_LABELS)
DOCKER_COMMAND?=docker build --build-arg TARGETPLATFORM=linux/amd64 --progress=$(DOCKER_BUILD_PROGRESS) $(KONG_EE_PORTS_FLAG) $(DOCKER_LABELS)
else
DOCKER_COMMAND?=docker buildx build --progress=$(DOCKER_BUILD_PROGRESS) $(KONG_EE_PORTS_FLAG) --push --platform="linux/amd64,linux/arm64" $(DOCKER_LABELS)
endif
Expand Down
7 changes: 5 additions & 2 deletions dockerfiles/Dockerfile.package
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ ARG RESTY_IMAGE_TAG="18.04"
ARG PACKAGE_TYPE
ARG KONG_VERSION
ARG KONG_PACKAGE_NAME
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM}
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM}

ARG PACKAGE_CONFLICTS="kong-enterprise-edition"
ENV PACKAGE_CONFLICTS $PACKAGE_CONFLICTS
Expand All @@ -40,4 +43,4 @@ COPY kong.logrotate /tmp/build/etc/kong/kong.logrotate
RUN /fpm-entrypoint.sh

FROM alpine
COPY --from=FPM /output /output
COPY --from=FPM /output /output
3 changes: 1 addition & 2 deletions fpm-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ elif [ "$PACKAGE_TYPE" == "rpm" ]; then
OUTPUT_FILE_SUFFIX=".el${RESTY_IMAGE_TAG}"
fi
fi
OUTPUT_FILE_SUFFIX="${OUTPUT_FILE_SUFFIX}."$(echo ${BUILDPLATFORM} | awk -F "/" '{ print $2}')

OUTPUT_FILE_SUFFIX="${OUTPUT_FILE_SUFFIX}."$(echo ${TARGETPLATFORM} | awk -F "/" '{ print $2}')
ROCKSPEC_VERSION=`basename /tmp/build/build/usr/local/lib/luarocks/rocks/kong/*`

if [ "$PACKAGE_TYPE" == "apk" ]; then
Expand Down

0 comments on commit 648d71b

Please sign in to comment.