-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add s390x support to docker images #1749
Conversation
1. add s390x support to docker images `executor`, `executor(slim)`, `executor(debug)` and `warmer`. Fixes GoogleContainerTools#1462 and GoogleContainerTools#1665. 2. Address the building issue of dependency `docker-credential-gcr` in Dockerfiles. This issue was introduced when recent commits in `docker-credential-gcr` removed the Makefile. Signed-off-by: Kun-Lu <kun.lu@ibm.com>
Hi @tejal29 , could you please take a look at this PR? Thank you! |
@kun-lu20 Sorry for the delay. Can you please rebase? |
Signed-off-by: Kun-Lu <kun.lu@ibm.com>
@tejal29 Sure, I've merged the code changes from master branch. Thanks very much for reviewing this PR. Below is the output of {
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2200,
"digest": "sha256:764adac47a34da7bd82cec0bb2f2bdc26a4994b1bd42630939260a2813b22a7d",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2200,
"digest": "sha256:54567721e174f9935e007536d2c448fbe77eaa07e24c2721a362d6a25b7b94d2",
"platform": {
"architecture": "arm64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2200,
"digest": "sha256:d2f789f116cb8f6936620ee37e34959505b214591974319764dfd2d3bfd1f597",
"platform": {
"architecture": "ppc64le",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2200,
"digest": "sha256:b68a19acea6c083f51ecfb99869d9e43f524869f85c2f8cf8c73773730828020",
"platform": {
"architecture": "s390x",
"os": "linux"
}
}
]
} |
The built image was also verified on s390x system: $ docker run --rm -it kaniko-project/executor:v1.6.0 version
Kaniko version : v1.6.0 $ echo -e 'FROM alpine \nRUN echo "created from standard input"' > Dockerfile | tar -cf - Dockerfile | gzip -9 | docker run \
--interactive -v $(pwd):/workspace kaniko-project/executor:v1.6.0 \
--context tar://stdin \
--no-push
INFO[0000] To simulate EOF and exit, press 'Ctrl+D'
INFO[0000] Retrieving image manifest alpine
INFO[0000] Retrieving image alpine from registry index.docker.io
INFO[0001] Built cross stage deps: map[]
INFO[0001] Retrieving image manifest alpine
INFO[0001] Returning cached image manifest
INFO[0001] Executing 0 build triggers
INFO[0001] Unpacking rootfs as cmd RUN echo "created from standard input" requires it.
INFO[0002] RUN echo "created from standard input"
INFO[0002] Taking snapshot of full filesystem...
INFO[0002] cmd: /bin/sh
INFO[0002] args: [-c echo "created from standard input"]
INFO[0002] Running: [/bin/sh -c echo "created from standard input"]
created from standard input
INFO[0002] Taking snapshot of full filesystem...
INFO[0002] No files were changed, appending empty layer to config. No layer added to image.
INFO[0002] Skipping push to container registry due to --no-push flag |
Awesome! thanks. |
if you are still around, please rebase again on latest master or else, I have a PR with your commits here #1769 |
closing this, since I chery-picked your commit in #1769 on master with tests enabled to hit the target release for Oct 20th |
@tejal29 Thank you so much! Sorry I was not around due to timezone difference. |
@kun-lu20 I am having trouble releasing with What do you think about just adding these platforms for |
Hi @tejal29 , thanks, I observed these issues as well. For building a docker-credentials-gcr binary, I found that using the following lines in Dockerfiles works on all platforms: go get -u -t ./... && \
go build -ldflags "-linkmode external -extldflags -static" -i -o /usr/local/bin/docker-credential-gcr main.go |
@tejal29 Could you please give it a try? We'd be very glad to see all the kaniko images work on s390x. Thanks! diff --git a/deploy/Dockerfile b/deploy/Dockerfile
index 331b1062..cddd2fd9 100644
--- a/deploy/Dockerfile
+++ b/deploy/Dockerfile
@@ -32,8 +32,8 @@ RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \
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 && \
- git checkout 4cdd60d0f2d8a69bc70933f4d7718f9c4e956ff8 && \
- go build -o /usr/local/bin/docker-credential-gcr main.go
+ go get -u -t ./... && \
+ 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 && \
|
Trying now. |
Here is the build for your suggestion b5257e8 |
It still now working
|
@tejal29 Thank you very much! It looks like at least building I'll further look into this issue and try to fix it. |
Signed-off-by: Kun-Lu <kun.lu@ibm.com>
Hi @tejal29 , I've added s390x support to Please take a look when you have some time. Thank you very much! |
The executor-debug image based on busybox seems to have failed building due to:
Do you happen to know why this would happen? I'm not familiar enough with busybox on s390x to understand why this might fail. |
Hi @imjasonh , I haven't encountered this issue before. I am looking into it to try to find a workaround. |
Hi @imjasonh , I made some tests on s390x VM. It looks like busybox needs some lib files which lie in A |
Thanks for looking into that! I'm a bit worried that, since we don't have automated tests for s390x, we might unintentionally break this. I guess just building the image was sufficient to discover the bug... 🤔 At the very least, can you add a comment in the Dockerfile describing why we copy |
Yes, I think so. I will keep an eye on it as well and we'll be very happy to solve any issues reg s390x. I've added a comment in the Dockerfile, could you please take a look? Thanks @imjasonh |
Thanks @imjasonh ! |
Fixes #1462 and #1665
Description
The aim of this PR is to add s390x support to docker images
executor
,executor(slim)
,executor(debug)
andwarmer
. Related PR: #1684.This PR also addresses the building issue of dependency
docker-credential-gcr
in Kaniko's Dockerfiles. Projectdocker-credential-gcr
removed its Makefile in recent commits, so themake deps
command used in kaniko's Dockerfile fails. This PR uses commandgo get -u -t ./...
instead which will achieve the same goal. Related PR: #1741 and #1744.Signed-off-by: Kun-Lu kun.lu@ibm.com
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
This PR could be verified locally using
docker buildx
andqemu
, or via CI workflow in GitHub Actions.See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.