forked from AlertaDengue/PySUS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
37 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
FROM python:3.12-slim
LABEL maintainer="luabidaa@gmail.com"
LABEL org.opencontainers.image.source="https://github.com/AlertaDengue/PySUS"
LABEL org.opencontainers.image.description="PySUS - Data extraction from Brazilian public health systems"
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME "/home/pysus"
ENV PATH "$PATH:/home/pysus/.local/bin"
RUN apt-get -qq update --yes \
&& apt-get -qq install --yes --no-install-recommends \
libffi-dev \
build-essential \
ca-certificates \
sudo \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash pysus \
&& echo "pysus ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/pysus \
&& chmod 0440 /etc/sudoers.d/pysus \
&& mkdir -p /home/pysus/Notebooks \
&& chown -R pysus:pysus /home/pysus
COPY pyproject.toml poetry.lock LICENSE README.md /usr/src/
COPY pysus /usr/src/pysus
COPY entrypoint.sh /entrypoint.sh
RUN pip install poetry \
&& cd /usr/src && poetry config virtualenvs.create false && poetry install --with docs \
&& chown -R pysus:pysus /home/pysus
USER pysus
WORKDIR /home/pysus/Notebooks
ENTRYPOINT ["/entrypoint.sh"]