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

Make the docker Image pack:base built on the same base image as pack:x.x.x-base #2240

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

hhiroshell
Copy link
Contributor

@hhiroshell hhiroshell commented Jul 30, 2024

Summary

Currently, the docker image pack:base is built on the same base image as tiny. But it is considered that the image should be based on the same image as pack:x.x.x-base, so this PR corrects it.

This PR make changes below:

  • Add ${{ matrix.suffix }} to the source tag for retagging in the delivery-docker.yml, making the pack:base image.
  • Make a small fix to the helper script for testing the GitHub Action workflows on forked repositories.

Output

Before

  • The pack:x.x.x-base doesn't have sh
$ docker run --rm -it --entrypoint sh buildpacksio/pack:base
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown.

After

Tested using images build with my fork repository.

  • The pack:x.x.x-base and pack:base has the sh and echo
$ docker run --rm -it --entrypoint sh ghcr.io/hhiroshell/pack:0.2.0-base
Unable to find image 'ghcr.io/hhiroshell/pack:0.2.0-base' locally
0.2.0-base: Pulling from hhiroshell/pack
3713021b0277: Already exists
b8d22795b29f: Pull complete
Digest: sha256:e914b59c36cd8dd90fdd05a98233219b2518d29629be775cbd058747fea8af63
Status: Downloaded newer image for ghcr.io/hhiroshell/pack:0.2.0-base
# echo aaaa
aaaa

$ docker run --rm -it --entrypoint sh ghcr.io/hhiroshell/pack:base
Unable to find image 'ghcr.io/hhiroshell/pack:base' locally
base: Pulling from hhiroshell/pack
Digest: sha256:e914b59c36cd8dd90fdd05a98233219b2518d29629be775cbd058747fea8af63
Status: Downloaded newer image for ghcr.io/hhiroshell/pack:base
# echo aaaa
aaaa
  • The pack:latest and pack:xxx doesn't have sh, because based on the distroless
$ docker run --rm -it --entrypoint sh ghcr.io/hhiroshell/pack:latest
Unable to find image 'ghcr.io/hhiroshell/pack:latest' locally
latest: Pulling from hhiroshell/pack
f531499c6b73: Pull complete
...
Digest: sha256:5ff2af78112489da719204239161dc98d32927f5c40b72cc8bab5ab726467c77
Status: Downloaded newer image for ghcr.io/hhiroshell/pack:latest
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown.

$ docker run --rm -it --entrypoint sh ghcr.io/hhiroshell/pack:0.2.0
Unable to find image 'ghcr.io/hhiroshell/pack:0.2.0' locally
0.2.0: Pulling from hhiroshell/pack
Digest: sha256:5ff2af78112489da719204239161dc98d32927f5c40b72cc8bab5ab726467c77
Status: Downloaded newer image for ghcr.io/hhiroshell/pack:0.2.0
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown.

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #2111

@hhiroshell hhiroshell requested review from a team as code owners July 30, 2024 09:10
@github-actions github-actions bot added this to the 0.36.0 milestone Jul 30, 2024
@github-actions github-actions bot added the type/chore Issue that requests non-user facing changes. label Jul 30, 2024
@natalieparellano natalieparellano modified the milestones: 0.36.0, 0.35.1 Jul 30, 2024
Copy link
Member

@natalieparellano natalieparellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you so much for taking this on @hhiroshell and for the detailed testing!

@natalieparellano natalieparellano merged commit 004deb6 into buildpacks:main Jul 31, 2024
16 checks passed
@hhiroshell hhiroshell deleted the fix-pack-2111-2 branch August 1, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore Issue that requests non-user facing changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker Image pack:base does not include shell
2 participants