-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
27 lines (19 loc) · 883 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
FROM python:3.10.9-slim
#MAINTAINER Alex Mattson "[email protected]"
RUN apt-get update && apt-get install -y --no-install-recommends \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
wget -O /bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.14/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe && \
wget -O /bin/curl https://github.com/moparisthebest/static-curl/releases/download/v7.86.0/curl-amd64 && \
chmod +x /bin/curl
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app
#RUN addgroup -S appuser && adduser -S -G appuser appuser # commented out when switching to `slim` from `alpine`
RUN addgroup --system appuser && adduser --system appuser --ingroup appuser
USER appuser
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]