uploader/Dockerfile

26 lines
591 B
Docker
Raw Normal View History

2024-05-06 09:00:57 +00:00
FROM python:alpine
# Update package lists and install necessary dependencies
RUN apk update &&
apk add --no-cache build-base icu-data-full curl python3-dev musl-dev &&
curl -sSL https://install.python-poetry.org | python
# Set working directory
2023-09-27 23:05:14 +00:00
WORKDIR /app
2024-05-06 09:00:57 +00:00
# Copy only the pyproject.toml file initially
COPY pyproject.toml /app/
# Install poetry and dependencies
RUN pip install poetry &&
poetry config virtualenvs.create false &&
poetry install --no-root --only main
# Copy the rest of the files
2023-12-02 05:44:06 +00:00
COPY . /app
2024-05-06 09:00:57 +00:00
# Expose the port
EXPOSE 8000
CMD ["python", "server.py"]