-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
34 lines (23 loc) · 826 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
FROM python:3.11-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
FROM python:3.11-slim
LABEL org.label-schema.schema-version = "1.0"
LABEL org.label-schema.name = "hiroshi"
LABEL org.label-schema.vendor = "nagaev.sv@gmail.com"
LABEL org.label-schema.vcs-url = "https://github.com/s-nagaev/hiroshi"
ENV PYTHONUNBUFFERED 1
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
WORKDIR /app
COPY . .
RUN groupadd hiroshi && useradd -g hiroshi hiroshi
RUN chown hiroshi:hiroshi /app/data
USER hiroshi
ENTRYPOINT []
CMD python main.py