-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrasp.Dockerfile
56 lines (45 loc) · 1.26 KB
/
rasp.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#**************************************
# Build By:
# https://itheo.tech 2024
# MIT License
# Dockerfile to run the python script
#**************************************
FROM python:3.11-slim-bookworm as base
LABEL org.opencontainers.image.authors="[email protected]"
ENV TZ=Europe/Amsterdam
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
apt-utils \
tzdata \
locales \
python3-dev \
cmake \
g++ \
gcc \
libxml2-dev \
libxslt-dev \
build-essential \
docker-compose && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
apt-get -y autoremove
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
RUN pip install --upgrade pip
WORKDIR /src
COPY requirements.txt .
COPY ./src .
RUN pip install -r requirements.txt --no-cache-dir
FROM base as dev
ENV PY_ENV=dev
CMD [ "python", "main.py" ]
FROM base as acc
ENV PY_ENV=acc
CMD [ "python", "main.py" ]
FROM base as PROD
ENV PY_ENV=prod
CMD [ "python", "main.py" ]