Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add --no-cache flag
  • Loading branch information
fabidick22 committed Mar 26, 2020
commit 8ed8869ce9b74860dcf44b2b79b691a27277bcd7
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
FROM python:3.8-alpine

ARG buildDeps='g++'
ARG buildDeps='g++ gnupg curl'

WORKDIR /usr/src/app

COPY . .

RUN apk update \
&& apk add --no-cache $buildDeps gcc unixodbc-dev \
&& pip3 install --no-cache-dir -r requirements/prod.txt \
&& pip3 install --no-cache-dir -r requirements/prod.txt \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.apk \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.sig \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.sig \
&& curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - \
&& gpg --verify msodbcsql17_17.5.2.1-1_amd64.sig msodbcsql17_17.5.2.1-1_amd64.apk \
&& gpg --verify mssql-tools_17.5.2.1-1_amd64.sig mssql-tools_17.5.2.1-1_amd64.apk \
&& apk add --allow-untrusted msodbcsql17_17.5.2.1-1_amd64.apk \
&& apk add --allow-untrusted mssql-tools_17.5.2.1-1_amd64.apk \
&& apk add --no-cache --allow-untrusted msodbcsql17_17.5.2.1-1_amd64.apk \
&& apk add --no-cache --allow-untrusted mssql-tools_17.5.2.1-1_amd64.apk \
&& 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 \
&& apk del $buildDeps \
&& rm -rfv /root/.cache/pip/* && \
find /usr/local \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rfv '{}' \+
Expand Down