-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
65 lines (58 loc) · 1.72 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Open the docker app and run the following commands:
# TO BUILD THE IMAGE FOR YOUR PLATFORM:
#
# docker build -t REPO-NAME .
#
# TU RUN THE DOCKER CONTAINER:
#
# docker run -p PORT:PORT REPO-NAME
#
#
# TO PUSH THE IMAGE TO DOCKER HUB:
# docker login
#
# docker tag REPO-NAME:latest ACCOUNT-NAME/REPO-NAME:latest
#
# docker push ACCOUNT-NAME/REPO-NAME:latest
#
#
#
# TO BUILD THE IMAGE FOR MULTIPLE PLATFORMS:
# First create the builder for the multiplatform image if not exixt.
# Use the following command to see if exit:
#
# docker buildx ls
#
# If not create and activate it with:
#
# docker buildx create --name BUILDER-NAME
#
# docker buildx use BUILDER-NAME
#
# docker buildx inspect --bootstrap
#
# The create on docker hub the repository if you want to deploy if not skip
# Suppose you want to deploy and the repo is colled REPO-NAME Now you can build the image with the following command:
# Remember the point at the end in the row below --push \
#
# docker buildx build --platform linux/amd64,linux/arm64 -t ACCOUNT-NAME/REPO-NAME:latest --push .
#
# If you want it locally instead (maybe):
#
# docker buildx build --platform linux/amd64,linux/arm64 -t REPO-NAME --pull .
#
#
# Use a platform-neutral base image
FROM python:3 AS base
# Install required system packages
RUN apt-get update && apt-get install -y libgl1-mesa-glx
# Set the working directory in the container
WORKDIR /TelegramBot-AmazonOffers
# Copy the current directory contents into the container at /app
COPY . /TelegramBot-AmazonOffers
# Install any needed dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Expose port 8000 for the Flask application
EXPOSE 8000
# Run main.py when the container launches
CMD ["python", "src/main.py"]