Skip to content

Commit

Permalink
Revert "Merge pull request #164 from andrewnicols/buildsqlsrv"
Browse files Browse the repository at this point in the history
This reverts commit 50f9dd3, reversing
changes made to b532e39.

Part of #168, this reverts #164
  • Loading branch information
stronk7 committed Mar 17, 2023
1 parent 50f9dd3 commit 9185c69
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions root/tmp/setup/sqlsrv-extension.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

if [[ ${TARGETPLATFORM} != "linux/amd64" ]]; then
echo "sqlsrv extension not available for ${TARGETPLATFORM} architecture, skipping"
exit 0
fi

# Packages for build.
BUILD_PACKAGES="gnupg unixodbc-dev"

Expand All @@ -19,16 +24,17 @@ apt-get install -y --no-install-recommends apt-transport-https \
# Install Microsoft dependencies for sqlsrv
echo "Downloading sqlsrv files"
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/11/prod.list -o /etc/apt/sources.list.d/mssql-release.list
# TODO, bullseye should be 11, but the msodbcsql17 package is not available yet, hence using buster (10) one.
curl https://packages.microsoft.com/config/debian/10/prod.list -o /etc/apt/sources.list.d/mssql-release.list
apt-get update

echo "Install msodbcsql"
ACCEPT_EULA=Y apt-get install -y msodbcsql18
ACCEPT_EULA=Y apt-get install -y msodbcsql17

ln -fsv /opt/mssql-tools/bin/* /usr/bin

# Need 5.11.0 (or later) for PHP 8.2 support
pecl install sqlsrv-5.11.0
# Need 5.10.1 (or later) for PHP 8.2 support
pecl install sqlsrv-5.10.1
docker-php-ext-enable sqlsrv

# Keep our image size down..
Expand Down

0 comments on commit 9185c69

Please sign in to comment.