1
1
# Declare the target platform to support multi-arch builds
2
- ARG TARGETPLATFORM
2
+ ARG TARGETPLATFORM=linux/amd64
3
3
4
4
# To make sure we have the node, and golang binaries
5
- FROM --platform=$TARGETPLATFORM node:20.17.0-bookworm AS node
6
- FROM --platform=$TARGETPLATFORM golang:1.23.1-bookworm AS golang
5
+ FROM node:20.17.0-bookworm AS node
6
+ FROM golang:1.23.1-bookworm AS golang
7
7
8
8
# Set the base image, general environment variables, and move to temp dir
9
- FROM --platform=$TARGETPLATFORM debian:12.7
10
- RUN echo "Building for $TARGETPLATFORM"
9
+ FROM debian:12.7
10
+ ARG TARGETPLATFORM
11
+ RUN echo "Building for ${TARGETPLATFORM}"
11
12
ENV DEBIAN_FRONTEND="noninteractive"
12
13
ENV GOBIN="/usr/local/go-bin"
13
14
ENV PATH="$PATH:/usr/local/go-bin:/usr/local/dl-bin:/usr/local/go/bin"
@@ -37,7 +38,7 @@ RUN apt update && apt install -y postgresql-common && \
37
38
# Install downloadable binaries
38
39
RUN set -e && \
39
40
if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
40
- echo "Downloading arm64 binaries" \
41
+ echo "Downloading arm64 binaries" && \
41
42
# Install task
42
43
wget --no-verbose https://github.com/go-task/task/releases/download/v3.38.0/task_linux_arm64.tar.gz && \
43
44
tar -xzf task_linux_arm64.tar.gz && \
@@ -54,7 +55,7 @@ RUN set -e && \
54
55
tar -xzf golangci-lint-1.60.3-linux-arm64.tar.gz && \
55
56
mv ./golangci-lint-1.60.3-linux-arm64/golangci-lint /usr/local/dl-bin/golangci-lint; \
56
57
else \
57
- echo "Downloading amd64 binaries" \
58
+ echo "Downloading amd64 binaries" && \
58
59
# Install task
59
60
wget --no-verbose https://github.com/go-task/task/releases/download/v3.38.0/task_linux_amd64.tar.gz && \
60
61
tar -xzf task_linux_amd64.tar.gz && \
0 commit comments