Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for arm64 #2589

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d3469e6
New demo featuring Online Boutique with Score and Humanitec (Platform…
mathieu-benoit Apr 22, 2024
7ef1409
Merge branch 'GoogleCloudPlatform:main' into main
mathieu-benoit Apr 28, 2024
13a589a
Merge branch 'GoogleCloudPlatform:main' into main
mathieu-benoit May 9, 2024
d5c1696
Merge branch 'GoogleCloudPlatform:main' into main
mathieu-benoit May 30, 2024
20801e5
Merge branch 'GoogleCloudPlatform:main' into main
mathieu-benoit Jun 14, 2024
03765c4
--platform=$BUILDPLATFORM
mathieu-benoit Jun 15, 2024
f196796
platforms: ["linux/amd64", "linux/arm64"]
mathieu-benoit Jun 15, 2024
ff03708
ARG BUILDPLATFORM
mathieu-benoit Jun 15, 2024
3aef8d3
-a $TARGETARCH
mathieu-benoit Jun 18, 2024
7af25d8
Merge branch 'main' into arm64
mathieu-benoit Jun 18, 2024
1ffe75a
Fix TrimMode=full
mathieu-benoit Jun 18, 2024
bbabef2
Update skaffold.yaml - useDockerCLI: true
mathieu-benoit Jun 19, 2024
f587461
Merge branch 'main' into arm64
mathieu-benoit Jun 19, 2024
c370db6
Merge branch 'main' into arm64
mathieu-benoit Dec 30, 2024
44a5e90
Merge branch 'main' into arm64
mathieu-benoit Jan 7, 2025
673bb59
Merge branch 'main' into arm64
mathieu-benoit Jan 14, 2025
b68919f
multi-arch digest for python 3.12.8
mathieu-benoit Jan 15, 2025
f5729e7
dotnet 9.0.1
mathieu-benoit Jan 15, 2025
c033780
eclipse-temurin:21.0.5_11
mathieu-benoit Jan 15, 2025
ec0868b
golang:1.23.4-alpine
mathieu-benoit Jan 15, 2025
bc9993c
node:20.18.1-alpine
mathieu-benoit Jan 15, 2025
f7d2768
Fix python container on arm64 (linux-headers and libstdc++)
mathieu-benoit Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ kind: Config
metadata:
name: app
build:
platforms: ["linux/amd64", "linux/arm64"]
artifacts:
# image tags are relative; to specify an image repo (e.g. GCR), you
# must provide a "default repo" using one of the methods described
Expand Down Expand Up @@ -49,7 +50,7 @@ build:
tagPolicy:
gitCommit: {}
local:
useBuildkit: false
useBuildkit: true
manifests:
kustomize:
paths:
Expand Down
6 changes: 2 additions & 4 deletions src/adservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM eclipse-temurin:21@sha256:75e0ef9789c2ae11886a6414290bff43858aafd03439e545e77ef9948f100a84 as builder
FROM --platform=$BUILDPLATFORM eclipse-temurin:21@sha256:75e0ef9789c2ae11886a6414290bff43858aafd03439e545e77ef9948f100a84 as builder

WORKDIR /app

Expand All @@ -25,9 +25,7 @@ COPY . .
RUN chmod +x gradlew
RUN ./gradlew installDist

FROM eclipse-temurin:21.0.3_9-jre-alpine@sha256:23467b3e42617ca197f43f58bc5fb03ca4cb059d68acd49c67128bfded132d67

RUN apk add --no-cache ca-certificates
mathieu-benoit marked this conversation as resolved.
Show resolved Hide resolved
FROM --platform=$BUILDPLATFORM eclipse-temurin:21.0.3_9-jre-alpine@sha256:23467b3e42617ca197f43f58bc5fb03ca4cb059d68acd49c67128bfded132d67

# @TODO: https://github.com/GoogleCloudPlatform/microservices-demo/issues/2517
# Download Stackdriver Profiler Java agent
Expand Down
14 changes: 7 additions & 7 deletions src/cartservice/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
# limitations under the License.

# https://mcr.microsoft.com/product/dotnet/sdk
FROM mcr.microsoft.com/dotnet/sdk:8.0.302-noble@sha256:fa69db4553830bd5c28d701867796bf5939988c74d70284774c628a8a4361442 as builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0.302-noble@sha256:fa69db4553830bd5c28d701867796bf5939988c74d70284774c628a8a4361442 as builder
ARG TARGETARCH
WORKDIR /app
COPY cartservice.csproj .
RUN dotnet restore cartservice.csproj \
-r linux-x64
-a $TARGETARCH
COPY . .
RUN dotnet publish cartservice.csproj \
-p:PublishSingleFile=true \
-r linux-x64 \
-a $TARGETARCH \
--self-contained true \
-p:PublishTrimmed=True \
-p:TrimMode=Full \
-p:PublishTrimmed=true \
-p:TrimMode=full \
-c release \
-o /cartservice \
--no-restore
-o /cartservice

# https://mcr.microsoft.com/product/dotnet/runtime-deps
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0.6-noble-chiseled@sha256:1745aa8e322b6965ea3ec8524b9f9eb128f146c804e32b1fc2272ed07ada4c8e
Expand Down
2 changes: 1 addition & 1 deletion src/cartservice/src/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:02fdc848bbda5d57d9211a72c99bd665b421206002d66b8bc2cc0b2297c227fa AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0@sha256:02fdc848bbda5d57d9211a72c99bd665b421206002d66b8bc2cc0b2297c227fa AS build
WORKDIR /app
COPY . .
RUN dotnet restore cartservice.csproj
Expand Down
2 changes: 1 addition & 1 deletion src/checkoutservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
FROM --platform=$BUILDPLATFORM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
WORKDIR /src

# restore dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/currencyservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM node:20.14.0-alpine@sha256:66c7d989b6dabba6b4305b88f40912679aebd9f387a5b16ffa76dfb9ae90b060 as builder
FROM --platform=$BUILDPLATFORM node:20.14.0-alpine@sha256:66c7d989b6dabba6b4305b88f40912679aebd9f387a5b16ffa76dfb9ae90b060 as builder

# Some packages (e.g. @google-cloud/profiler) require additional
# deps for post-install scripts
Expand All @@ -27,7 +27,7 @@ COPY package*.json ./

RUN npm install --only=production

FROM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd
FROM --platform=$BUILDPLATFORM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd

RUN apk add --no-cache nodejs

Expand Down
2 changes: 1 addition & 1 deletion src/emailservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base
FROM --platform=$BUILDPLATFORM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base

FROM base as builder

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
FROM --platform=$BUILDPLATFORM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
WORKDIR /src

# restore dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/loadgenerator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base
FROM --platform=$BUILDPLATFORM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base

FROM base as builder

Expand Down
4 changes: 2 additions & 2 deletions src/paymentservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM node:20.14.0-alpine@sha256:66c7d989b6dabba6b4305b88f40912679aebd9f387a5b16ffa76dfb9ae90b060 as builder
FROM --platform=$BUILDPLATFORM node:20.14.0-alpine@sha256:66c7d989b6dabba6b4305b88f40912679aebd9f387a5b16ffa76dfb9ae90b060 as builder

# Some packages (e.g. @google-cloud/profiler) require additional
# deps for post-install scripts
Expand All @@ -27,7 +27,7 @@ COPY package*.json ./

RUN npm install --only=production

FROM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd
FROM --platform=$BUILDPLATFORM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd

RUN apk add --no-cache nodejs

Expand Down
2 changes: 1 addition & 1 deletion src/productcatalogservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 AS builder

WORKDIR /src
# restore dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/recommendationservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base
FROM --platform=$BUILDPLATFORM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base

FROM base as builder

Expand Down
2 changes: 1 addition & 1 deletion src/shippingservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
FROM --platform=$BUILDPLATFORM golang:1.22.3-alpine@sha256:7e788330fa9ae95c68784153b7fd5d5076c79af47651e992a3cdeceeb5dd1df0 as builder
WORKDIR /src

# restore dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/shoppingassistantservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base
FROM --platform=$BUILDPLATFORM python:3.12.3-slim@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as base

FROM base as builder

Expand Down
Loading