go-sqlcmd docker image
- Supported architectures: amd64, arm64, s390x
- Uses gcr.io/distroless/static:nonroot as image base
- Uses released sqlcmd binary
- Updated automatically by Renovate
# Pull image from Docker Hub
docker pull bonddim/go-sqlcmd
# Or GitHub Container Registry
docker pull ghcr.io/bonddim/go-sqlcmd
Docker container with mounted scripts to run:
docker run \
--rm \
-v $(pwd)/sql_scripts:/mnt/sql \
-e SQLCMDPASSWORD={{ password }} \
ghcr.io/bonddim/go-sqlcmd \
-i /mnt/sql \
-S {{ server }} \
-d {{ database }} \
-u {{ user }}
K8s pod with Entra ID authentication:
apiVersion: v1
kind: Pod
metadata:
name: go-sqlcmd
labels:
azure.workload.identity/use: "true"
spec:
serviceAccountName: go-sqlcmd
containers:
- name: go-sqlcmd
image: bonddim/go-sqlcmd
args:
- --use-aad
- --server
- {{ server }}.database.windows.net
- --database-name
- {{ database }}
- --query
- {{ query }}
securityContext:
runAsNonRoot: true
...
Refer to official docs for syntax and command line arguments
Inherited from microsoft/go-sqlcmd