Use target platform (rather than build platform) for multi-platform container images

Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
This commit is contained in:
Matthew Cengia 2023-01-23 08:28:20 +07:00
parent bd6ab1d5de
commit d763e69799
No known key found for this signature in database
GPG Key ID: 652968EE25069D6F

View File

@ -15,7 +15,7 @@ RUN yarn build
RUN mv -f target/config.json /config.json.bundled \ RUN mv -f target/config.json /config.json.bundled \
&& ln -sf /tmp/config.json target/config.json && ln -sf /tmp/config.json target/config.json
FROM --platform=${BUILDPLATFORM} docker.io/nginxinc/nginx-unprivileged:alpine FROM --platform=${TARGETPLATFORM} docker.io/nginxinc/nginx-unprivileged:alpine
# Copy the dynamic config script # Copy the dynamic config script
COPY ./docker/dynamic-config.sh /docker-entrypoint.d/99-dynamic-config.sh COPY ./docker/dynamic-config.sh /docker-entrypoint.d/99-dynamic-config.sh