-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
49 lines (41 loc) · 1.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM python:3.12-slim
LABEL maintainer="Intensive Care Department 4131 - Rigshospitalet"
LABEL org.opencontainers.image.source="https://github.com/INCEPTdk/omop_etl"
ARG AG="env DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends"
RUN set -eux; \
$AG update; \
$AG install \
build-essential \
wget \
unzip \
; \
$AG autoremove; \
$AG clean; \
rm -rf \
/var/lib/apt/lists/* \
/var/lib/dpkg/*-old /var/cache/debconf/*-old \
/tmp/* \
;
ARG DEV_BUILD=""
ENV DEV_BUILD=${DEV_BUILD}
COPY requirements.txt requirements.dev.txt /
RUN set -eux; \
pip install --upgrade pip; \
pip install -r /requirements.txt; \
if [ -n "$DEV_BUILD" ]; then pip install -r /requirements.dev.txt; fi; \
pip cache purge;
RUN wget https://github.com/duckdb/duckdb/releases/download/v1.0.0/duckdb_cli-linux-amd64.zip && \
unzip duckdb_cli-linux-amd64.zip && \
mv duckdb /usr/local/bin/ && \
chmod +x /usr/local/bin/duckdb && \
rm duckdb_cli-linux-amd64.zip
# these 2 variables are expected by the app code
ARG COMMIT_SHA="dev"
ARG GITHUB_TAG="dev"
ENV COMMIT_SHA="${COMMIT_SHA}" GITHUB_TAG="${GITHUB_TAG}"
WORKDIR /etl
COPY . .
RUN mkdir /data
RUN mkdir /vocab
RUN mkdir /users
ENTRYPOINT ["./docker/entrypoint.sh"]