Skip to content

Commit 3bec882

Browse files
committed
Move all instructions for for mssql to x86_64 condition in Dockerfile
1 parent d5e3bf4 commit 3bec882

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ WORKDIR /etc/shlink
1515

1616
# Install required PHP extensions
1717
RUN \
18-
# Temp install dev dependencies needed to compile the extensions
18+
# Temp install dev dependencies needed to compile the extensions \
1919
apk add --no-cache --virtual .dev-deps sqlite-dev postgresql-dev icu-dev libzip-dev zlib-dev linux-headers && \
2020
docker-php-ext-install -j"$(nproc)" pdo_mysql pdo_pgsql intl calendar sockets bcmath zip && \
2121
apk add --no-cache sqlite-libs && \
2222
docker-php-ext-install -j"$(nproc)" pdo_sqlite && \
23-
# Remove temp dev extensions, and install prod equivalents that are required at runtime
23+
# Remove temp dev extensions, and install prod equivalents that are required at runtime \
2424
apk del .dev-deps && \
2525
apk add --no-cache postgresql icu libzip libpng
2626

2727
# Install sqlsrv driver for x86_64 builds
28-
RUN apk add --no-cache --virtual .phpize-deps ${PHPIZE_DEPS} unixodbc-dev && \
29-
if [ $(uname -m) == "x86_64" ]; then \
28+
RUN if [ $(uname -m) == "x86_64" ]; then \
29+
apk add --no-cache --virtual .phpize-deps ${PHPIZE_DEPS} unixodbc-dev && \
3030
wget https://download.microsoft.com/download/${MS_ODBC_DOWNLOAD}/msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
3131
apk add --allow-untrusted msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
3232
pecl install pdo_sqlsrv-${PDO_SQLSRV_VERSION} && \
3333
docker-php-ext-enable pdo_sqlsrv && \
34-
rm msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk ; \
35-
fi; \
36-
apk del .phpize-deps
34+
rm msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
35+
apk del .phpize-deps; \
36+
fi
3737

3838
# Install shlink
3939
FROM base AS builder

0 commit comments

Comments
 (0)