Skip to content

Commit 084caca

Browse files
committed
Add SQLServer tools into the Docker Container manually
1 parent 3827583 commit 084caca

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "3.0"
1+
# Description: Docker Compose file for running the CFWheels Test Suite
22

33
services:
44
testui:
@@ -125,4 +125,4 @@ services:
125125
ACCEPT_EULA: Y
126126
MSSQL_PID: Developer
127127
ports:
128-
- "1434:1433"
128+
- "1434:1433"

docker/sqlserver/Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
FROM mcr.microsoft.com/azure-sql-edge:latest
1+
FROM mcr.microsoft.com/azure-sql-edge
22

33
LABEL maintainer "CFWheels Core Team"
44

5+
# add sqlcmd from https://github.com/microsoft/go-sqlcmd
6+
# we add this to /opt/mssql-tools/bin which completely overrides the
7+
# sqlcmd from the base image. Read up on why we do this here:
8+
# https://github.com/microsoft/go-sqlcmd/discussions/501#discussion-6088877
9+
WORKDIR /opt/mssql-tools/bin
10+
ENV GOSQLCMD_VERSION=v1.5.0
11+
ARG TARGETPLATFORM
12+
RUN case ${TARGETPLATFORM} in \
13+
"linux/amd64") GOSQLCMD_ARCH=amd64 ;; \
14+
"linux/arm64") GOSQLCMD_ARCH=arm64 ;; \
15+
*) echo "Unsupported platform: ${TARGETPLATFORM}"; exit 1 ;; \
16+
esac \
17+
&& wget https://github.com/microsoft/go-sqlcmd/releases/download/${GOSQLCMD_VERSION}/sqlcmd-${GOSQLCMD_VERSION}-linux-${GOSQLCMD_ARCH}.tar.bz2 \
18+
&& tar -xjf sqlcmd-${GOSQLCMD_VERSION}-linux-${GOSQLCMD_ARCH}.tar.bz2
19+
520
# Set environment variables, not to have to write them with docker run command
621
ENV MSSQL_SA_PASSWORD "x!bsT8t60yo0cTVTPq"
722
ENV ACCEPT_EULA "Y"

0 commit comments

Comments
 (0)