forked from d-Rickyy-b/Python-GeizhalsBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
21 lines (16 loc) · 801 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.5-alpine
LABEL maintainer="d-Rickyy-b <[email protected]>"
LABEL site="https://github.com/d-Rickyy-b/Python-GeizhalsBot"
# Create bot & log directories
RUN mkdir -p /usr/src/bot/logs
WORKDIR /usr/src/bot
# Copy the source code to the container
COPY . /usr/src/bot
# Install dependencies needed for installing the python requirements
# In particular 'lxml' needs to be compiled first
# After installation of the packages all unnecessary dependencies are removed
RUN apk add -U --no-cache gcc build-base linux-headers python3-dev libffi-dev libressl-dev libxslt-dev \
&& pip3 install --no-cache -r requirements.txt \
&& apk del gcc build-base linux-headers python3-dev libffi-dev libressl-dev
# Start the main file when the container is started
ENTRYPOINT ["python3", "main.py"]