Skip to content

How to add sqlcmd into ARM azure-sql-edge? #501

Closed Answered by d4vidsha
d4vidsha asked this question in Q&A
Discussion options

You must be logged in to vote

After some further digging, I'm downloading the go-sqlcmd binaries directly into our Dockerfile, utilising the convention outlined here.

An example Dockerfile:

FROM mcr.microsoft.com/azure-sql-edge:latest

USER root

# add sqlcmd from https://github.com/microsoft/go-sqlcmd
# we add this to /opt/mssql-tools/bin which completely overrides the
# sqlcmd from the base image. Read up on why we do this here:
# https://github.com/microsoft/go-sqlcmd/discussions/501#discussion-6088877
WORKDIR /opt/mssql-tools/bin
ENV GOSQLCMD_VERSION=v1.5.0
ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
    "linux/amd64")  GOSQLCMD_ARCH=amd64 ;; \
    "linux/arm64")  GOSQLCMD_ARCH=arm64 ;; \
    *) echo "Unsup…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@d4vidsha
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by d4vidsha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants