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

[BUG] Wrong entrypoint set when omitting the entrypoint parameter #136

Open
picsel2 opened this issue Apr 26, 2024 · 0 comments · May be fixed by #137
Open

[BUG] Wrong entrypoint set when omitting the entrypoint parameter #136

picsel2 opened this issue Apr 26, 2024 · 0 comments · May be fixed by #137
Labels
bug Something isn't working

Comments

@picsel2
Copy link

picsel2 commented Apr 26, 2024

Version

redhat-actions/push-to-registry@v2

Describe the bug

Building an image "from scratch" without providing an entrypoint parameter lets the action pass --entrypoint ] to buildah.
This erroneously overrides the entrypoint given by a base image and breaks container execution.

Steps to reproduce, workflow links, screenshots

  • Build without containerfile using an already build base image. I used nginx from docker hub here.
  • Do not pass the entrypoint parameter.

Example action

#[...]
    - name: Build container image
      uses: https://github.com/redhat-actions/buildah-build@v2
      with:
        base-image: docker.io/library/nginx:mainline-bookworm
        content: |
          public
          /usr/share/nginx/html          
        image: registry.grabel.de/grabel.de/site
        oci: true
#[...]

Action output

::group::/usr/bin/buildah version
[command]/usr/bin/buildah version
Version:         1.28.2
Go Version:      go1.19.8
Image Spec:      1.1.0-rc2
Runtime Spec:    1.0.2-dev
CNI Spec:        1.0.0
libcni Version:  
image Version:   5.23.1
Git Commit:      
Built:           Thu Jan  1 00:00:00 1970
OS/Arch:         linux/amd64
BuildPlatform:   linux/amd64
::endgroup::
Storage driver is not 'overlay', so not overriding storage configuration
Performing build from scratch
[command]/usr/bin/buildah from --tls-verify=true docker.io/library/nginx:mainline-bookworm
Trying to pull docker.io/library/nginx:mainline-bookworm...
Getting image source signatures
Copying blob sha256:93295add984dbd114a6f43401f08e6faf4510809e33e8f8a2e6485399fa0e03c
Copying blob sha256:8ddb1e6cdf341aca028fb6fc4cbd9c2ba9e9a1cae1b186a587f2dffe33c0d587
Copying blob sha256:988b92d96970464ab9435aa6af3077e283c1c8eacaee200f8c123315486066ec
Copying blob sha256:b0a0cf830b12453b7e15359a804215a7bcccd3788e2bcecff2a03af64bbd4df7
Copying blob sha256:5252b206aac298fb004dbe62210d127533f8aeb6a5eb0b8f79e28ddc01bd2419
Copying blob sha256:7102627a7a6e4da3b80e192b686d57139b8c6d4ff405918dd508e784a4abc639
Copying blob sha256:ebde0aa1d1aaad9d43da96b7f0e4a4ebccde16cc4d785944629f02406cd54b44
Copying config sha256:7383c266ef252ad70806f3072ee8e63d2a16d1e6bafa6146a2da867fc7c41759
Writing manifest to image destination
Storing signatures
nginx-working-container
[command]/usr/bin/buildah config --entrypoint ] nginx-working-container
time="2024-04-25T08:50:59Z" level=warning msg="cmd \"nginx -g daemon off;\" exists but will be ignored because of entrypoint settings"
[command]/usr/bin/buildah copy nginx-working-container public /usr/share/nginx/html
fc061c5e0221874626147f29d88b1fe3c1caad22eb586c226247d16b5e2e69f8
[command]/usr/bin/buildah commit --format oci --squash nginx-working-container registry.grabel.de/grabel.de/site:latest
Getting image source signatures
Copying blob sha256:1916481b1a7c62091627c97e8d167e3ba32b45952f12486dc600d4507eb2b0d5
Copying config sha256:d8891fe6be0533248f32f4671edc44bc18b4aa2629cf51b8303bb58c3a2ac8b5
Writing manifest to image destination
Storing signatures
d8891fe6be0533248f32f4671edc44bc18b4aa2629cf51b8303bb58c3a2ac8b5
✅ Successfully built image "registry.grabel.de/grabel.de/site:latest"
@picsel2 picsel2 added the bug Something isn't working label Apr 26, 2024
picsel2 added a commit to picsel2/buildah-build that referenced this issue Apr 26, 2024
The entrypoint array of BuildahConfigSettings might be empty. It makes
no sense to push the `--entrypoint` argument then, thus breaking the
`convertArrayToStringArg` method.

Closes redhat-actions#136
@picsel2 picsel2 linked a pull request Apr 26, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant