You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a third party is an unacceptable solution in contexts where container security is taken into account. Please provide official images for official tools.
Reacted by David Young, Keith Walters and Helge Brügner
For now, we’ve opted to build and host our own non-root image in our private registry.
Since version v1.7.0 (released in June 2024), Docker images are no longer published in the GitHub releases. As a result, the latest available official container image is now over a year old.
This was previously addressed in #153, but it seems the release process has since been reverted, and no recent builds are available.
Here’s the Dockerfile we’re using to build a minimal, non-root container based on the latest tag:
FROM golang:1 AS builder
RUN git clone https://github.com/microsoft/go-sqlcmd.git && \
cd go-sqlcmd && \
git checkout $(git tag --sort=version:refname | tail -n 1) && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-o /sqlcmd \
-ldflags="-X main.version=$(git tag --sort=version:refname | tail -n 1)" \
./cmd/modern
FROM gcr.io/distroless/static:nonroot
COPY --from=builder /sqlcmd /sqlcmd
USER 1002
ENTRYPOINT ["/sqlcmd"]
We hope this helps others with similar needs until official container builds are available again.
Activity
CappyT commentedon Apr 15, 2025
Using a third party is an unacceptable solution in contexts where container security is taken into account. Please provide official images for official tools.
dedo1911 commentedon Jul 9, 2025
For now, we’ve opted to build and host our own non-root image in our private registry.
Since version v1.7.0 (released in June 2024), Docker images are no longer published in the GitHub releases. As a result, the latest available official container image is now over a year old.
This was previously addressed in #153, but it seems the release process has since been reverted, and no recent builds are available.
Here’s the Dockerfile we’re using to build a minimal, non-root container based on the latest tag:
We hope this helps others with similar needs until official container builds are available again.
CC: David Shiflet (@shueybubbles) Stuart Padley (@stuartpa) — tagging in case this context is useful or if there’s interest in restoring the Docker image publishing process.
bonddim commentedon Oct 21, 2025
Meanwhile, my solution with non-root image and without binary rebuilding
https://github.com/bonddim/go-sqlcmd