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

chore: multi-arch support with buildx in all Dockerfiles #5273

Merged
merged 47 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
bc99e8d
chore: use buildx to build grpc-ping-go
kahirokunn Oct 13, 2022
b9803d2
chore: support grpc-ping-go multiple architecture
kahirokunn Jul 13, 2023
a4b813e
chore: support helloworld-clojure multiple architecture
kahirokunn Aug 21, 2023
c2da2ea
chore: support helloworld-dart multiple architecture
kahirokunn Aug 21, 2023
f762e05
chore: support helloworld-deno multiple architecture
kahirokunn Aug 21, 2023
f94c327
chore: support helloworld-elixir multiple architecture
kahirokunn Aug 21, 2023
08f9d7b
chore: support helloworld-haskell multiple architecture
kahirokunn Aug 21, 2023
6c3c5b9
chore: support helloworld-java-micronaut multiple architecture
kahirokunn Aug 21, 2023
1fa16ca
chore: support helloworld-java-quarkus multiple architecture
kahirokunn Aug 21, 2023
f4cbe35
chore: support helloworld-r multiple architecture
kahirokunn Aug 21, 2023
10abcec
chore: support helloworld-rserver multiple architecture
kahirokunn Aug 21, 2023
051535a
chore: support helloworld-rust multiple architecture
kahirokunn Aug 21, 2023
aa3c156
chore: support helloworld-swift multiple architecture
kahirokunn Aug 21, 2023
e483893
chore: support helloworld-vertx multiple architecture
kahirokunn Aug 21, 2023
6ec0d50
chore: support iris-classifier multiple architecture
kahirokunn Aug 21, 2023
11b6fd8
chore: support helloworld-go multiple architecture
kahirokunn Aug 21, 2023
03450f1
chore: support helloworld-python multiple architecture
kahirokunn Aug 21, 2023
9348862
chore: support node-heartbeat-source multiple architecture
kahirokunn Aug 21, 2023
2f47e5d
chore: support cloudevents-dotnet multiple architecture
kahirokunn Aug 21, 2023
55ae30e
chore: support cloudevents-go multiple architecture
kahirokunn Aug 21, 2023
5afbd0c
chore: support cloudevents-nodejs multiple architecture
kahirokunn Aug 21, 2023
f3920c3
chore: support cloudevents-rust multiple architecture
kahirokunn Aug 21, 2023
0b77ea1
chore: support gitwebhook-go multiple architecture
kahirokunn Aug 21, 2023
4a21fa6
chore: support helloworld-csharp multiple architecture
kahirokunn Aug 21, 2023
183f7ae
chore: support helloworld-go multiple architecture
kahirokunn Aug 21, 2023
b416fe4
chore: support helloworld-java-spark multiple architecture
kahirokunn Aug 21, 2023
fcbb20c
chore: support helloworld-java-spring multiple architecture
kahirokunn Aug 21, 2023
6adf20b
chore: support helloworld-kotlin multiple architecture
kahirokunn Aug 21, 2023
bcdedb9
chore: support helloworld-nodejs multiple architecture
kahirokunn Aug 21, 2023
39fdc46
chore: support helloworld-php multiple architecture
kahirokunn Aug 21, 2023
53925b6
chore: support helloworld-python multiple architecture
kahirokunn Aug 21, 2023
eca9add
chore: support helloworld-shell multiple architecture
kahirokunn Aug 21, 2023
9b21923
chore: support knative-routing-go multiple architecture
kahirokunn Aug 21, 2023
2c32fa9
chore: support kong-routing-go multiple architecture
kahirokunn Aug 21, 2023
25d2053
chore: support multi-container multiple architecture
kahirokunn Aug 21, 2023
a7f55a4
chore: support secrets-go multiple architecture
kahirokunn Aug 21, 2023
d5110e1
chore: support knative-docs multiple architecture
kahirokunn Aug 21, 2023
8f83f02
chore: support helloworld-r Dockerfile multiple architecture
kahirokunn Aug 21, 2023
ccd11fa
chore: support helloworld-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
e4d1c57
chore: support cloudevents-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
03973df
chore: support gitwebhook-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
6a39a06
chore: support knative-routing-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
99f3841
chore: support kong-routing-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
be33765
chore: support servingcontainer Dockerfile multiple architecture
kahirokunn Aug 21, 2023
66ac14a
chore: support sidecarcontainer Dockerfile multiple architecture
kahirokunn Aug 21, 2023
5442985
chore: support secrets-go Dockerfile multiple architecture
kahirokunn Aug 21, 2023
9a3b5b4
chore: support multi-container Dockerfile multiple architecture
kahirokunn Aug 21, 2023
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
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-clojure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-clojure .

# Push the container to docker registry
docker push {username}/helloworld-clojure
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-clojure" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-clojure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-clojure .

# Push the container to docker registry
docker push {username}/helloworld-clojure
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-clojure" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-dart .

# Push the container to docker registry
docker push {username}/helloworld-dart
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-dart" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
9 changes: 3 additions & 6 deletions code-samples/community/serving/helloworld-dart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ that you can use for testing. It reads in the env variable `TARGET` and prints
## Prerequisites

- A Kubernetes cluster with Knative installed and DNS configured. Follow the
[Knative installation instructions](https://knative.dev/docs/install/) if
[Knative installation instructions](https://knative.dev/docs/install/) if
you need to create one.
- [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry).
Expand Down Expand Up @@ -64,11 +64,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-dart .

# Push the container to docker registry
docker push {username}/helloworld-dart
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-dart" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-deno .

# Push the container to docker registry
docker push {username}/helloworld-deno
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-deno" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-deno/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-deno .

# Push the container to docker registry
docker push {username}/helloworld-deno
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-deno" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-elixir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,8 @@ above.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-elixir .

# Push the container to docker registry
docker push {username}/helloworld-elixir
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-elixir" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-elixir/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,8 @@ above.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-elixir .

# Push the container to docker registry
docker push {username}/helloworld-elixir
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-elixir" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-haskell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-haskell .

# Push the container to docker registry
docker push {username}/helloworld-haskell
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-haskell" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-haskell/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-haskell .

# Push the container to docker registry
docker push {username}/helloworld-haskell
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-haskell" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,8 @@ your sample app to your cluster:
following commands with your Docker Hub username.

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-micronaut .

# Push the container to docker registry
docker push {username}/helloworld-java-micronaut
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-micronaut" --push .
```

1. Now that your container image is in the registry, you can deploy it to your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,8 @@ your sample app to your cluster:
following commands with your Docker Hub username.

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-micronaut .

# Push the container to docker registry
docker push {username}/helloworld-java-micronaut
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-micronaut" --push .
```

1. Now that your container image is in the registry, you can deploy it to your
Expand Down
11 changes: 4 additions & 7 deletions code-samples/community/serving/helloworld-java-quarkus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,12 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-quarkus .
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-quarkus" --push .

# (OR)
# Build the container on your local machine - Quarkus native mode
docker build -t {username}/helloworld-java-quarkus -f Dockerfile.native .

# Push the container to docker registry
docker push {username}/helloworld-java-quarkus
# Build and push the container on your local machine. - Quarkus native mode
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-quarkus" --push . -f Dockerfile.native
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
11 changes: 4 additions & 7 deletions code-samples/community/serving/helloworld-java-quarkus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,12 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-quarkus .
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-quarkus" --push .

# (OR)
# Build the container on your local machine - Quarkus native mode
docker build -t {username}/helloworld-java-quarkus -f Dockerfile.native .

# Push the container to docker registry
docker push {username}/helloworld-java-quarkus
# Build and push the container on your local machine. - Quarkus native mode
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-java-quarkus" --push . -f Dockerfile.native
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
5 changes: 4 additions & 1 deletion code-samples/community/serving/helloworld-r/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
# https://hub.docker.com/_/golang
FROM golang:1.12 as builder

ARG TARGETOS
ARG TARGETARCH

# Copy local code to the container image.
WORKDIR /go/src/github.com/knative/docs/helloworld-r
COPY invoke.go .

# Build the command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep".)
RUN CGO_ENABLED=0 GOOS=linux go build -v -o invoke
RUN CGO_ENABLED=0 GOOS=linux GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -v -o invoke

# The official R base image
# https://hub.docker.com/_/r-base
Expand Down
12 changes: 6 additions & 6 deletions code-samples/community/serving/helloworld-r/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ cd knative-docs/code-samples/community/serving/hello-world/helloworld-r
# https://hub.docker.com/_/golang
FROM golang:1.12 as builder

ARG TARGETOS
ARG TARGETARCH

# Copy local code to the container image.
WORKDIR /go/src/github.com/knative/docs/helloworld-r
COPY invoke.go .

# Build the command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep".)
RUN CGO_ENABLED=0 GOOS=linux go build -v -o invoke
RUN CGO_ENABLED=0 GOOS=linux GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -v -o invoke

# The official R base image
# https://hub.docker.com/_/r-base
Expand Down Expand Up @@ -131,11 +134,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-r .

# Push the container to docker registry
docker push {username}/helloworld-r
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-r" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
12 changes: 6 additions & 6 deletions code-samples/community/serving/helloworld-r/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ cd knative-docs/code-samples/community/serving/hello-world/helloworld-r
# https://hub.docker.com/_/golang
FROM golang:1.12 as builder

ARG TARGETOS
ARG TARGETARCH

# Copy local code to the container image.
WORKDIR /go/src/github.com/knative/docs/helloworld-r
COPY invoke.go .

# Build the command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep".)
RUN CGO_ENABLED=0 GOOS=linux go build -v -o invoke
RUN CGO_ENABLED=0 GOOS=linux GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -v -o invoke

# The official R base image
# https://hub.docker.com/_/r-base
Expand Down Expand Up @@ -131,11 +134,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-r .

# Push the container to docker registry
docker push {username}/helloworld-r
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-r" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-rserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rserver .

# Push the container to docker registry
docker push {username}/helloworld-rserver
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-rserver" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-rserver/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rserver .

# Push the container to docker registry
docker push {username}/helloworld-rserver
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-rserver" --push .
```

1. After the build has completed and the container is pushed to docker hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rust .

# Push the container to docker registry
docker push {username}/helloworld-rust
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-rust" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-rust/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rust .

# Push the container to docker registry
docker push {username}/helloworld-rust
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-rust" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-swift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-swift .

# Push the container to docker registry
docker push {username}/helloworld-swift
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-swift" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-swift/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ folder) you're ready to build and deploy the sample app.
username:

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-swift .

# Push the container to docker registry
docker push {username}/helloworld-swift
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-swift" --push .
```

1. After the build has completed and the container is pushed to Docker Hub, you
Expand Down
7 changes: 2 additions & 5 deletions code-samples/community/serving/helloworld-vertx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,8 @@ your sample app to your cluster:
following commands with your Docker Hub username.

```bash
# Build the container on your local machine
docker build -t {username}/helloworld-vertx .

# Push the container to docker registry
docker push {username}/helloworld-vertx
# Build and push the container on your local machine.
docker buildx build --platform linux/arm64,linux/amd64 -t "{username}/helloworld-vertx" --push .
```

1. Now that your container image is in the registry, you can deploy it to your
Expand Down
Loading
Loading