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 s390x support to docker images #1749

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
runs-on: ubuntu-latest
steps:
- name: Clone source code
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
with:
context: .
file: ./deploy/Dockerfile_slim
platforms: linux/amd64,linux/arm64,linux/ppc64le
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}-slim
Expand All @@ -67,7 +67,7 @@ jobs:
with:
context: .
file: ./deploy/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}
Expand All @@ -94,7 +94,7 @@ jobs:
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
runs-on: ubuntu-latest
steps:
- name: Clone source code
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
with:
context: .
file: ./deploy/Dockerfile_debug
platforms: linux/amd64,linux/arm64,linux/ppc64le
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}-debug
Expand All @@ -163,7 +163,7 @@ jobs:
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
runs-on: ubuntu-latest
steps:
- name: Clone source code
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
with:
context: .
file: ./deploy/Dockerfile_warmer
platforms: linux/amd64,linux/arm64,linux/ppc64le
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
gcr.io/kaniko-project/warmer:${{ env.GITHUB_SHA }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN GOARCH=$(cat /goarch) && (mkdir -p /go/src/github.com/chrismellard || true)
RUN mkdir -p /kaniko/.docker

COPY . .
RUN make GOARCH=$(cat /goarch.txt)
RUN make GOARCH=$(cat /goarch)

# Generate latest ca-certificates

Expand Down
12 changes: 9 additions & 3 deletions deploy/Dockerfile_debug
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ RUN cat /goarch


# Get GCR credential helper
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.0.1/docker-credential-gcr_linux_$GOARCH-2.0.1.tar.gz /usr/local/bin/
RUN tar --no-same-owner -C /usr/local/bin/ -xvzf /usr/local/bin/docker-credential-gcr_linux_$GOARCH-2.0.1.tar.gz
RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \
(mkdir -p /go/src/github.com/GoogleCloudPlatform || true) && \
cd /go/src/github.com/GoogleCloudPlatform && \
git clone https://github.com/GoogleCloudPlatform/docker-credential-gcr.git && \
cd /go/src/github.com/GoogleCloudPlatform/docker-credential-gcr && \
# pin to a specific commit
git checkout 4cdd60d0f2d8a69bc70933f4d7718f9c4e956ff8 && \
go build -ldflags "-linkmode external -extldflags -static" -i -o /usr/local/bin/docker-credential-gcr main.go

# Get Amazon ECR credential helper
RUN GOARCH=$(cat /goarch) && go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login && \
Expand All @@ -48,7 +54,7 @@ RUN GOARCH=$(cat /goarch) && (mkdir -p /go/src/github.com/chrismellard || true)
RUN mkdir -p /kaniko/.docker

COPY . .
RUN make GOARCH=$(cat /goarch) && make GOARCH=$(cat /goarch.txt) out/warmer
RUN make GOARCH=$(cat /goarch) && make GOARCH=$(cat /goarch) out/warmer

# Generate latest ca-certificates

Expand Down
10 changes: 8 additions & 2 deletions deploy/Dockerfile_warmer
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ RUN [ ! "x" = "x$TARGETPLATFORM" ] && `echo $TARGETPLATFORM | awk '{split($0,a,
RUN echo "I am runninng $TARGETPLATFORM with $(cat /goarch)"

# Get GCR credential helper
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.0.1/docker-credential-gcr_linux_$GOARCH-2.0.1.tar.gz /usr/local/bin/
RUN tar --no-same-owner -C /usr/local/bin/ -xvzf /usr/local/bin/docker-credential-gcr_linux_$GOARCH-2.0.1.tar.gz
RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \
(mkdir -p /go/src/github.com/GoogleCloudPlatform || true) && \
cd /go/src/github.com/GoogleCloudPlatform && \
git clone https://github.com/GoogleCloudPlatform/docker-credential-gcr.git && \
cd /go/src/github.com/GoogleCloudPlatform/docker-credential-gcr && \
# pin to a specific commit
git checkout 4cdd60d0f2d8a69bc70933f4d7718f9c4e956ff8 && \
go build -ldflags "-linkmode external -extldflags -static" -i -o /usr/local/bin/docker-credential-gcr main.go

# Get Amazon ECR credential helper
RUN GOARCH=$(cat /goarch) && go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login && \
Expand Down
1 change: 1 addition & 0 deletions hack/install_golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ is_supported_platform() {
linux/amd64) found=0 ;;
linux/386) found=0 ;;
linux/ppc64le) found=0 ;;
linux/s390x) found=0 ;;
esac
return $found
}
Expand Down