-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (29 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
50 lines (29 loc) · 1.08 KB
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.10.19-alpine3.22 as build
WORKDIR /usr/src/app
# RUN rm /usr/lib/python*/EXTERNALLY-MANAGED
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
RUN python3 -m venv /usr/src/app/venv
ENV PATH="/usr/src/app/venv/bin:$PATH"
COPY requirements.txt .
RUN apk update && apk add postgresql-dev gcc musl-dev
RUN pip3 install --requirement requirements.txt
FROM python:3.10.19-alpine3.22
WORKDIR /usr/src/app
RUN apk add --update --no-cache gcc g++
RUN apk add --update --no-cache git make libcap-dev elogind-dev asciidoc build-base
RUN apk --no-cache add libpq
RUN git clone https://github.com/ioi/isolate.git
WORKDIR /usr/src/app/isolate
RUN git reset --hard b5e87ec10c5c83830b0ab4b9d908437e4c14e426
WORKDIR /usr/src/app
RUN make --directory=isolate isolate
RUN make --directory=isolate install
# RUN addgroup -S otog -g 1000 \
# && adduser -S -G otog -u 1000 otog
#RUN chown otog:otog /usr/src/app
COPY --from=build /usr/src/app/venv ./venv
COPY . .
#USER otog
ENV PATH="/usr/src/app/venv/bin:$PATH"
CMD ["python3","-u","src/mainPostgresql.py"]