Skip to content

Commit ae3ea91

Browse files
authored
Merge pull request #45 from ioet/Update-Dockerfile-file
Add database drivers.
2 parents 377214b + 8ed8869 commit ae3ea91

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
FROM python:3.8-alpine
22

3-
ARG buildDeps='g++'
3+
ARG buildDeps='g++ gnupg curl'
44

55
WORKDIR /usr/src/app
66

77
COPY . .
88

99
RUN apk update \
1010
&& apk add --no-cache $buildDeps gcc unixodbc-dev \
11-
&& pip3 install --no-cache-dir -r requirements/prod.txt \
11+
&& pip3 install --no-cache-dir -r requirements/prod.txt \
12+
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk \
13+
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.apk \
14+
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.sig \
15+
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.sig \
16+
&& curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - \
17+
&& gpg --verify msodbcsql17_17.5.2.1-1_amd64.sig msodbcsql17_17.5.2.1-1_amd64.apk \
18+
&& gpg --verify mssql-tools_17.5.2.1-1_amd64.sig mssql-tools_17.5.2.1-1_amd64.apk \
19+
&& apk add --no-cache --allow-untrusted msodbcsql17_17.5.2.1-1_amd64.apk \
20+
&& apk add --no-cache --allow-untrusted mssql-tools_17.5.2.1-1_amd64.apk \
21+
&& rm msodbcsql17_17.5.2.1-1_amd64.apk mssql-tools_17.5.2.1-1_amd64.apk msodbcsql17_17.5.2.1-1_amd64.sig mssql-tools_17.5.2.1-1_amd64.sig \
1222
&& apk del $buildDeps \
1323
&& rm -rfv /root/.cache/pip/* && \
1424
find /usr/local \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rfv '{}' \+

0 commit comments

Comments
 (0)