No shell in container for 0.10.0 (breaks Gitlab CI)
I use taplo as part of a CI pipeline which requires a shell to be available in the container. Since release 0.10.0 there is no container image which includes a shell anymore.
Could you have a variant which includes a shell?
Could you have a variant which includes a shell?
No, taplo is usable without any dependencies and that way image provides only the binary itself. CI doesn't require shell, your pipeline configuration removes entrypoint which probably breaks it.
Could you have a variant which includes a shell?
No, taplo is usable without any dependencies and that way image provides only the binary itself. CI doesn't require shell, your pipeline configuration removes entrypoint which probably breaks it.
@panekj No, Gitlab CI requires a shell. See Image Requirements! Also, removing the entry point is necessary in this case, since all commands will be passed to that shell.
also having this issue. the lack of sh in the image is a real problem for gitlab ci. as a workaround, ig you could install taplo in the ci jobs via package manager instead of using the official image, but it's not great, so i'll probably downgrade to an older image version for the moment, ie 0.9.3
For anyone having the same problem, here is what I use as way to fix this:
FROM docker.io/tamasfe/taplo:0.10.0 as tablo_binary
FROM alpine
RUN apk add bash
COPY --from=tablo_binary /taplo /usr/local/bin/taplo
Maybe document about the workaround provided by @harmathy would be good enough.
i mean that works, but it still requires that you build the image yourself somewhere and store it in some container registry, as well as keep it up to date. like, it's not exactly complicated, but it does introduce a lot of friction
if this project prefers to keep the image maximally minimal though, i'm happy to provide provide that though.
If other platforms work except GitLab CI fails, I think we should not change anything here.
fair! if you don't care about version tags and just want the latest version (or pin to a specific digest), i've created an image you can use here: ghcr.io/shaddydc/taplo.
it's very minimal and will automatically be kept up to date with renovate:
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
COPY --from=docker.io/tamasfe/taplo:0.10.0@sha256:e0e247250609d2c0f3a77bc8003dc21eaa16ffd1b07ef4bad16c35f6845eec2b /taplo /usr/local/bin/taplo
alternatively, if you don't want some random's image, you can use nixery: nixery.dev/shell/taplo.
that will likely work, though they caution about using their images in prod, and the image size will be 159 mb to my 21mb and the official image's 13mb.
This problem is also breaking woodpecker-CI builds.
This is still very much an issue.