Dockerfile 692 Bytes
Newer Older
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
FROM python:3.9

#######################################
# Install ping and curl for debugging #
#######################################
RUN apt-get update

# install ping
RUN apt-get -y install iputils-ping curl

###############################
# Install Python dependencies #
###############################

# Add requirements file
ADD ./requirements.txt /tmp

WORKDIR /tmp

# Upgrade pip
RUN pip install --upgrade pip

# install requirements
RUN pip install -r requirements.txt

######################
# Start microservice #
######################

WORKDIR /usr/worker

COPY . .

# Expose Port 80 for development
EXPOSE 80

CMD ["python", "./api.py"]
# Only for debugging
# CMD /bin/bash