-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (29 loc) · 1.07 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
# Use the official Ubuntu base image with tag "jammy"
FROM ubuntu:jammy
# Set the maintainer label
LABEL maintainer="Nisuga Jayawardana <[email protected]>"
# Set environment variables for configuration
ENV PYTHON_VERSION=3.11 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
# Update the package lists and install Python3.11 with pip
RUN apt-get update && apt-get install -y python${PYTHON_VERSION} python3-pip
RUN update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1
RUN python --version
RUN python${PYTHON_VERSION} -m pip install --upgrade pip
RUN pip --version
# installing dependencies to run browsers.
RUN pip install poetry==1.7.0
#RUN pip install scrapy==2.11.0 scrapy-playwright==0.0.33
#RUN playwright install
#RUN playwright install-deps
WORKDIR /main-app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root
COPY . .
RUN poetry install
RUN touch README.md
ENTRYPOINT ["poetry", "run", "python", "-m", "main"]
EXPOSE 5842