File tree Expand file tree Collapse file tree 13 files changed +51
-27
lines changed Expand file tree Collapse file tree 13 files changed +51
-27
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ kind: Config
17
17
metadata :
18
18
name : app
19
19
build :
20
+ platforms : ["linux/amd64", "linux/arm64"]
20
21
artifacts :
21
22
# image tags are relative; to specify an image repo (e.g. GCR), you
22
23
# must provide a "default repo" using one of the methods described
49
50
tagPolicy :
50
51
gitCommit : {}
51
52
local :
52
- useBuildkit : false
53
+ useDockerCLI : true
54
+ useBuildkit : true
53
55
manifests :
54
56
kustomize :
55
57
paths :
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM eclipse-temurin:21@sha256:b5fc642f67dbbd1c4ce811388801cb8480aaca8aa9e56fd6dcda362cfea113f1 AS builder
15
+ FROM --platform=$BUILDPLATFORM eclipse-temurin:21.0.5_11-jdk @sha256:a20cfa6afdbf57ff2c4de77ae2d0e3725a6349f1936b5ad7c3d1b06f6d1b840a AS builder
16
16
17
17
WORKDIR /app
18
18
@@ -25,7 +25,7 @@ COPY . .
25
25
RUN chmod +x gradlew
26
26
RUN ./gradlew installDist
27
27
28
- FROM eclipse-temurin:21.0.4_7 -jre-alpine@sha256:8cc1202a100e72f6e91bf05ab274b373a5def789ab6d9e3e293a61236662ac27
28
+ FROM eclipse-temurin:21.0.5_11 -jre-alpine@sha256:4300bfe1e11f3dfc3e3512f39939f9093cf18d0e581d1ab1ccd0512f32fe33f0
29
29
30
30
# @TODO: https://github.com/GoogleCloudPlatform/microservices-demo/issues/2517
31
31
# Download Stackdriver Profiler Java agent
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
# https://mcr.microsoft.com/product/dotnet/sdk
16
- FROM mcr.microsoft.com/dotnet/sdk:9.0.100-noble@sha256:bd0365368f46274500ebb086f491703052b8ce23e3d52d3233a23b2020730057 AS builder
16
+ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0.101-noble@sha256:1f13e67d295e02abdfd187c341f887442bad611eda536766172ced401fc8b9fa AS builder
17
+ ARG TARGETARCH
17
18
WORKDIR /app
18
19
COPY cartservice.csproj .
19
20
RUN dotnet restore cartservice.csproj \
20
- -r linux-x64
21
+ -a $TARGETARCH
21
22
COPY . .
22
23
RUN dotnet publish cartservice.csproj \
23
24
-p:PublishSingleFile=true \
24
- -r linux-x64 \
25
+ -a $TARGETARCH \
25
26
--self-contained true \
26
27
-p:PublishTrimmed=true \
27
28
-p:TrimMode=full \
28
29
-c release \
29
30
-o /cartservice
30
31
31
32
# https://mcr.microsoft.com/product/dotnet/runtime-deps
32
- FROM mcr.microsoft.com/dotnet/runtime-deps:9.0.0 -noble-chiseled@sha256:5cc893809e2d2869e1a98c1eecc4c6ff6978d53bc3e5342014eff28a058867a4
33
+ FROM mcr.microsoft.com/dotnet/runtime-deps:9.0.1 -noble-chiseled@sha256:6f7466eda39e24efaf7eab2325e15d776a685d13cc93b4ea0cde9ee4f7982210
33
34
34
35
WORKDIR /app
35
36
COPY --from=builder /cartservice .
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
15
+ FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine@sha256:c23339199a08b0e12032856908589a6d41a0dab141b8b3b21f156fc571a3f1d3 AS builder
16
+ ARG TARGETOS
17
+ ARG TARGETARCH
16
18
WORKDIR /src
17
19
18
20
# restore dependencies
@@ -23,7 +25,7 @@ COPY . .
23
25
24
26
# Skaffold passes in debug-oriented compiler flags
25
27
ARG SKAFFOLD_GO_GCFLAGS
26
- RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /checkoutservice .
28
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /checkoutservice .
27
29
28
30
FROM scratch
29
31
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM node:20.17.0 -alpine@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 AS builder
15
+ FROM --platform=$BUILDPLATFORM node:20.18.1 -alpine@sha256:24fb6aa7020d9a20b00d6da6d1714187c45ed00d1eb4adb01395843c338b9372 AS builder
16
16
17
17
# Some packages (e.g. @google-cloud/profiler) require additional
18
18
# deps for post-install scripts
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM python:3.12.7 -alpine@sha256:b83d5ec7274bee17d2f4bd0bfbb082f156241e4513f0a37c70500e1763b1d90d AS base
15
+ FROM --platform=$BUILDPLATFORM python:3.12.8 -alpine@sha256:54bec49592c8455de8d5983d984efff76b6417a6af9b5dcc8d0237bf6ad3bd20 AS base
16
16
17
17
FROM base AS builder
18
18
19
19
RUN apk update \
20
- && apk add --no-cache wget g++ \
20
+ && apk add --no-cache g++ linux-headers \
21
21
&& rm -rf /var/cache/apk/*
22
22
23
23
# get packages
@@ -30,6 +30,10 @@ ENV PYTHONUNBUFFERED=1
30
30
# Enable Profiler
31
31
ENV ENABLE_PROFILER=1
32
32
33
+ RUN apk update \
34
+ && apk add --no-cache libstdc++ \
35
+ && rm -rf /var/cache/apk/*
36
+
33
37
WORKDIR /email_server
34
38
35
39
# Grab packages from builder
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
15
+ FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine@sha256:c23339199a08b0e12032856908589a6d41a0dab141b8b3b21f156fc571a3f1d3 AS builder
16
+ ARG TARGETOS
17
+ ARG TARGETARCH
16
18
WORKDIR /src
17
19
18
20
# restore dependencies
@@ -22,7 +24,7 @@ COPY . .
22
24
23
25
# Skaffold passes in debug-oriented compiler flags
24
26
ARG SKAFFOLD_GO_GCFLAGS
25
- RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /go/bin/frontend .
27
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /go/bin/frontend .
26
28
27
29
FROM scratch
28
30
WORKDIR /src
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM python:3.12.6-slim @sha256:ad48727987b259854d52241fac3bc633574364867b8e20aec305e6e7f4028b26 AS base
15
+ FROM --platform=$BUILDPLATFORM python:3.12.8-alpine @sha256:54bec49592c8455de8d5983d984efff76b6417a6af9b5dcc8d0237bf6ad3bd20 AS base
16
16
17
17
FROM base AS builder
18
18
19
+ RUN apk update \
20
+ && apk add --no-cache wget g++ linux-headers \
21
+ && rm -rf /var/cache/apk/*
22
+
19
23
COPY requirements.txt .
20
24
21
25
RUN pip install --prefix="/install" -r requirements.txt
22
26
23
27
FROM base
24
28
29
+ RUN apk update \
30
+ && apk add --no-cache libstdc++ \
31
+ && rm -rf /var/cache/apk/*
32
+
25
33
WORKDIR /loadgen
26
34
27
35
COPY --from=builder /install /usr/local
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM node:20.17.0 -alpine@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 AS builder
15
+ FROM --platform=$BUILDPLATFORM node:20.18.1 -alpine@sha256:24fb6aa7020d9a20b00d6da6d1714187c45ed00d1eb4adb01395843c338b9372 AS builder
16
16
17
17
# Some packages (e.g. @google-cloud/profiler) require additional
18
18
# deps for post-install scripts
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
15
+ FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine@sha256:c23339199a08b0e12032856908589a6d41a0dab141b8b3b21f156fc571a3f1d3 AS builder
16
+ ARG TARGETOS
17
+ ARG TARGETARCH
16
18
17
19
WORKDIR /src
18
20
# restore dependencies
@@ -22,7 +24,7 @@ COPY . .
22
24
23
25
# Skaffold passes in debug-oriented compiler flags
24
26
ARG SKAFFOLD_GO_GCFLAGS
25
- RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /productcatalogservice .
27
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /productcatalogservice .
26
28
27
29
FROM scratch
28
30
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM python:3.12.8-alpine@sha256:f92e36f6569658ba9501e2e1e3ca780d61faea8e84edd990a0ed70d0ca8add4a AS base
15
+ FROM --platform=$BUILDPLATFORM python:3.12.8-alpine@sha256:54bec49592c8455de8d5983d984efff76b6417a6af9b5dcc8d0237bf6ad3bd20 AS base
16
16
17
17
FROM base AS builder
18
18
19
19
RUN apk update \
20
- && apk add --no-cache \
21
- wget \
22
- g++ \
20
+ && apk add --no-cache g++ linux-headers \
23
21
&& rm -rf /var/cache/apk/*
24
22
25
23
# get packages
@@ -30,6 +28,10 @@ FROM base
30
28
# Enable unbuffered logging
31
29
ENV PYTHONUNBUFFERED=1
32
30
31
+ RUN apk update \
32
+ && apk add --no-cache libstdc++ \
33
+ && rm -rf /var/cache/apk/*
34
+
33
35
# get packages
34
36
WORKDIR /recommendationservice
35
37
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
15
+ FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine@sha256:c23339199a08b0e12032856908589a6d41a0dab141b8b3b21f156fc571a3f1d3 AS builder
16
+ ARG TARGETOS
17
+ ARG TARGETARCH
16
18
WORKDIR /src
17
19
18
20
# restore dependencies
@@ -22,7 +24,7 @@ COPY . .
22
24
23
25
# Skaffold passes in debug-oriented compiler flags
24
26
ARG SKAFFOLD_GO_GCFLAGS
25
- RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /go/bin/shippingservice .
27
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /go/bin/shippingservice .
26
28
27
29
FROM scratch
28
30
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM python:3.12.6 -slim@sha256:ad48727987b259854d52241fac3bc633574364867b8e20aec305e6e7f4028b26 AS base
15
+ FROM --platform=$BUILDPLATFORM python:3.12.8 -slim@sha256:123be5684f39d8476e64f47a5fddf38f5e9d839baff5c023c815ae5bdfae0df7 AS base
16
16
17
17
FROM base AS builder
18
18
19
19
RUN apt-get -qq update \
20
- && apt-get install -y --no-install-recommends \
21
- wget g++ \
20
+ && apt-get install -y --no-install-recommends g++ \
22
21
&& rm -rf /var/lib/apt/lists/*
23
22
24
23
# get packages
You can’t perform that action at this time.
0 commit comments