forked from GitGuardian/ggshield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 858 Bytes
/
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
# Keep image in sync with scripts/update-pipfile-lock/Dockerfile
FROM python:3.9-slim as build
LABEL maintainer="GitGuardian SRE Team <[email protected]>"
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV PIPENV_VENV_IN_PROJECT true
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PATH /app/.venv/bin:$PATH
WORKDIR /app
RUN \
apt-get update \
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends git openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install pipenv --upgrade
COPY . .
RUN pipenv install --ignore-pipfile --deploy
RUN set -ex; \
groupadd -g 1337 app; \
useradd -u 1337 -g 1337 -b /home -c "GitGuardian App User" -m -s /bin/sh app; \
mkdir /data; chmod 777 /data
USER app
WORKDIR /data
VOLUME [ "/data" ]
CMD ["ggshield"]