Docker image #42

Merged
Miroslavsckaya merged 13 commits from feature_docker into master 2022-08-13 16:41:20 +00:00
Showing only changes of commit b8c91b351a - Show all commits

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM python:alpine
WORKDIR /bot
COPY . .
skobkin marked this conversation as resolved
Review

You can probably copy only Python files and requirements.txt. We don't need anything else in the image to run the app.

You can use .dockerignore file to acomplish that. Check this documentation and my example.

This file will tell ADD/COPY to ignore some files you don't want to see in the image.

You can probably copy only Python files and `requirements.txt`. We don't need anything else in the image to run the app. You can use `.dockerignore` file to acomplish that. Check [this documentation](https://docs.docker.com/engine/reference/builder/#dockerignore-file) and [my example](https://git.skobk.in/skobkin/magnetico-web/src/branch/master/.dockerignore). This file will tell `ADD`/`COPY` to ignore some files you don't want to see in the image.
RUN pip install -r requirements.txt
ENV PYTHONUNBUFFERED='a'
ENTRYPOINT [ "python" ]
CMD [ "bot.py" ]