This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (39 loc) · 1.57 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
50
FROM python:3.8-slim
# We choose python-slim instead of alpine, a buildspeed vs image size tradeoff.
# In case you need base debian dependencies install them here.
# RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
# # TODO list depencies here \
# && apt-get clean && rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=noninteractive
# Install dev dependencies
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
gcc \
python3-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade --no-cache-dir setuptools pip
RUN pip install --no-cache-dir pipenv
# Copy source
WORKDIR /code
COPY . /code
# Install packages
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install
RUN pipenv lock
RUN pipenv sync
WORKDIR /code
# Make sure we use the virtualenv:
ENV PATH="/code/.venv/bin:$PATH"
# Metadata params
ARG BUILD_DATE
ARG VERSION
ARG GIT_COMMIT_HASH
# Metadata
LABEL org.opencontainers.image.authors="pdok.nl" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.title="linkage-checker" \
org.opencontainers.image.description="Python wrapper that runs and aggregates the INSPIRE linkage checker" \
org.opencontainers.image.url="https://github.com/PDOK/linkage-checker" \
org.opencontainers.image.vendor="PDOK" \
org.opencontainers.image.source="https://github.com/PDOK/linkage-checker" \
org.opencontainers.image.revision=$GIT_COMMIT_HASH \
org.opencontainers.image.version=$VERSION
ENTRYPOINT [ "linkage-checker" ]