-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 832 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 832 Bytes
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
FROM python:3.13 as nasz_python
WORKDIR /app
RUN apt-get update && apt-get install -y dumb-init && apt-get clean
ADD ./requirements.txt .
RUN python3 -m pip install -r requirements.txt
RUN python3 -m pip install urllib3==1.26.15
ADD ./setup.py .
ADD ./mariusz ./mariusz/
RUN python3 setup.py install
RUN mkdir /user && chown 1000:1000 /user
WORKDIR /user
ENV HOME=/user
FROM alpine/git as nasz_git
ADD ./.git/ /git
RUN git -C /git rev-parse HEAD > /tmp/commit-id
RUN git -C /git log HEAD --oneline | wc -l > /tmp/commit-no
RUN git -C /git show -s --format=%ci HEAD > /tmp/commit-date
FROM nasz_python
COPY --from=nasz_git /tmp/commit-id /tmp/commit-id
COPY --from=nasz_git /tmp/commit-no /tmp/commit-no
COPY --from=nasz_git /tmp/commit-date /tmp/commit-date
ENTRYPOINT ["dumb-init", "--", "python3.13", "-m", "mariusz.main"]