-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 921 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
FROM python:3.10 AS builder
COPY requirements.txt .
RUN addgroup --gid 2000 --system appgroup && \
adduser --uid 2000 --system appuser --gid 2000 --home /home/appuser
USER 2000
# install dependencies to the local user directory
RUN pip install --user -r requirements.txt
FROM python:3.10-slim
WORKDIR /app
RUN addgroup --gid 2000 --system appgroup && \
adduser --uid 2000 --system appuser --gid 2000 --home /home/appuser
# copy the dependencies from builder stage
COPY --chown=appuser:appgroup --from=builder /home/appuser/.local /home/appuser/.local
COPY includes includes
COPY classes classes
COPY processes processes
COPY utilities utilities
COPY ./github_discovery.py .
COPY ./github_teams_discovery.py .
COPY ./github_component_discovery.py .
COPY ./requirements.txt .
# update PATH environment variable
ENV PATH=/home/appuser/.local:$PATH
USER 2000
CMD [ "python", "-u", "github_discovery.py" ]