forked from gestaogovbr/api-pgd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (23 loc) · 668 Bytes
/
Dockerfile
File metadata and controls
23 lines (23 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.11.4-slim-bullseye
RUN useradd -ms /bin/bash -d /home/api-pgd api-pgd
WORKDIR /home/api-pgd
COPY requirements.txt requirements.txt
RUN \
apt-get update -yqq && \
apt-get upgrade -yqq && \
python3 -m pip install --upgrade pip
RUN \
python3 -m pip install -r requirements.txt --no-cache-dir && \
apt-get purge --auto-remove -yqq $buildDeps && \
apt-get autoremove -yqq --purge && \
apt-get clean && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
RUN chown -R api-pgd:api-pgd ./
COPY ./ /home/api-pgd
USER api-pgd