Skip to content

Commit

Permalink
Add echo command to Dockerfiles for TARGETPLATFORM during build
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardolat committed Nov 2, 2024
1 parent 146d01b commit 14b50fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM
RUN echo "Building for $TARGETPLATFORM"

# To make sure we have the node, and golang binaries
FROM --platform=$TARGETPLATFORM node:20.17.0-bookworm AS node
FROM --platform=$TARGETPLATFORM golang:1.23.1-bookworm AS golang

# Set the base image, general environment variables, and move to temp dir
FROM --platform=$TARGETPLATFORM debian:12.7
RUN echo "Building for $TARGETPLATFORM"
ENV DEBIAN_FRONTEND="noninteractive"
ENV GOBIN="/usr/local/go-bin"
ENV PATH="$PATH:/usr/local/go-bin:/usr/local/dl-bin:/usr/local/go/bin"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.cicd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM
RUN echo "Building for $TARGETPLATFORM"

# To make sure we have the node, and golang binaries
FROM --platform=$TARGETPLATFORM node:20.17.0-bookworm AS node
FROM --platform=$TARGETPLATFORM golang:1.23.1-bookworm AS golang

# Set the base image, general environment variables, and move to temp dir
FROM --platform=$TARGETPLATFORM debian:12.7
RUN echo "Building for $TARGETPLATFORM"
ENV DEBIAN_FRONTEND="noninteractive"
ENV GOBIN="/usr/local/go-bin"
ENV PATH="$PATH:/usr/local/go-bin:/usr/local/dl-bin:/usr/local/go/bin"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM
RUN echo "Building for $TARGETPLATFORM"

# To make sure we have the node, and golang binaries
FROM --platform=$TARGETPLATFORM node:20.17.0-bookworm AS node
FROM --platform=$TARGETPLATFORM golang:1.23.1-bookworm AS golang

# Set the base image, general environment variables, and move to temp dir
FROM --platform=$TARGETPLATFORM debian:12.7
RUN echo "Building for $TARGETPLATFORM"
ENV DEBIAN_FRONTEND="noninteractive"
ENV GOBIN="/usr/local/go-bin"
ENV PATH="$PATH:/usr/local/go-bin:/usr/local/dl-bin:/usr/local/go/bin"
Expand Down

0 comments on commit 14b50fc

Please sign in to comment.