Files
inbox/Dockerfile

22 lines
718 B
Docker
Raw Normal View History

2023-10-14 14:52:04 +03:00
# Use an official Python runtime as a parent image
2023-10-03 18:50:09 +03:00
FROM python:slim
2023-10-14 14:52:04 +03:00
# Set the working directory in the container to /app
2023-10-03 17:15:17 +03:00
WORKDIR /app
2023-10-03 18:29:56 +03:00
2023-10-14 14:52:04 +03:00
# Add metadata to the image to describe that the container is listening on port 80
2023-10-06 05:30:48 +03:00
EXPOSE 80
2023-10-14 14:52:04 +03:00
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in pyproject.toml
RUN apt-get update && apt-get install -y gcc curl && \
curl -sSL https://install.python-poetry.org | python - && \
2023-10-14 14:54:51 +03:00
echo "export PATH=$PATH:/root/.local/bin" >> ~/.bashrc && \
. ~/.bashrc && \
2023-10-14 14:52:04 +03:00
poetry config virtualenvs.create false && \
poetry install --no-dev
# Run server.py when the container launches
CMD ["python", "server.py"]