Skip to content

Commit

Permalink
Refactor Dockerfiles to include ARG for TARGETPLATFORM
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardolat committed Oct 14, 2024
1 parent b4bedcb commit 76b44d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM

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

# Set the base image, general environment variables, and move to temp dir
FROM debian:12.7
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="$PATH:/usr/local/go/bin"
WORKDIR /app/temp
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile.cicd
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM

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

# Set the base image, general environment variables, and move to temp dir
FROM debian:12.7
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="$PATH:/usr/local/go/bin"
WORKDIR /app/temp
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Declare the target platform to support multi-arch builds
ARG TARGETPLATFORM

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

# Set the base image, general environment variables, and move to temp dir
FROM debian:12.7
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="$PATH:/usr/local/go/bin"
WORKDIR /app/temp
Expand Down

0 comments on commit 76b44d4

Please sign in to comment.