2023-06-29 13:47:18 +02:00
|
|
|
|
|
|
|
# Start with a lightweight base image
|
|
|
|
FROM python:3.9-alpine
|
|
|
|
|
2023-07-03 09:44:59 +02:00
|
|
|
# Used by Github Actions to tag the image with
|
|
|
|
ENV IMAGE_TAG=0.0.1
|
|
|
|
|
2023-06-29 13:47:18 +02:00
|
|
|
# Set the working directory in the container
|
|
|
|
WORKDIR /srv
|
|
|
|
|
|
|
|
# Copy the requirements file to the container
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
|
|
|
# Install the Python dependencies
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
# Copy the rest of the application code to the container
|
|
|
|
COPY psql-init/ .
|
|
|
|
|
2023-07-03 10:41:35 +02:00
|
|
|
CMD ["python", "/srv/psql-init.py"]
|
|
|
|
|