-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (29 loc) · 1 KB
/
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
# Creazione dell'immagine docker
################################
# Immagine base di partenza
FROM python:3.6-slim-buster
# Metadati, etichette
LABEL name="pythonbiellagroupsite_docker"
LABEL maintainer="pythonbiellagroup@gmail.com"
LABEL version="1.0"
# Directory di lavoro (se non esiste viene creata)
WORKDIR /usr/src/app
# Variabili di ambiente
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# RUN:esecuzione di comandi
# Installazione dipendenze di sistema
RUN apt-get update && apt-get install -y netcat
# Installazione e aggiornamento pip
RUN pip install --upgrade pip
COPY ./requirements.txt /usr/src/app/requirements.txt
# Installazione dipendenze progetto
RUN pip install -r requirements.txt
# Copia del progetto dal disco a dentro il container
COPY . /usr/src/app/
# Entrypoint.sh to run the bash script for db
# Remember to set permissions to the file: chmod +x ./entrypoint.sh
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
# Verifica valorizzazione variabili di ambiente
RUN echo $FLASK_CONFIG
RUN echo $DB