-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 957 Bytes
/
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
# Dockerfile for the prod-to-dev-migration
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
# Install PostgreSQL and dependencies
RUN apt-get update && apt-get install ca-certificates -y
RUN apt install -y postgresql-common
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
RUN apt-get install postgresql-15 postgresql-client-15 -y
# Install dependencies necessary for add-apt-repository
RUN apt-get install software-properties-common -y
# Install Python and pip
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y \
python3.11 \
python3-pip
# This section ensures that the Python package installation built inside the Dockerfile
# is accessible within the container.
COPY requirements.txt /opt/app/requirements.txt
WORKDIR /opt/app
RUN pip install --no-cache-dir -r requirements.txt --break-system-packages
COPY . /opt/app
# Copy the app folder into the image
COPY --chmod=755 . .
EXPOSE 3000