Updates Dependencies, Creates Dockerfile and Formats Code
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM python:3.10
|
||||
LABEL authors="hideyoshi"
|
||||
|
||||
# Configure Poetry
|
||||
ENV POETRY_VERSION=1.5.1
|
||||
ENV POETRY_HOME=/opt/poetry
|
||||
ENV POETRY_VENV=/opt/poetry-venv
|
||||
ENV POETRY_CACHE_DIR=/opt/.cache
|
||||
|
||||
# Install poetry separated from system interpreter
|
||||
RUN python3 -m venv $POETRY_VENV \
|
||||
&& $POETRY_VENV/bin/pip install -U pip setuptools \
|
||||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
|
||||
|
||||
# Add `poetry` to PATH
|
||||
ENV PATH="${PATH}:${POETRY_VENV}/bin"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY . .
|
||||
|
||||
RUN poetry install
|
||||
|
||||
EXPOSE 5000-9000
|
||||
|
||||
# Run your app
|
||||
CMD [ "poetry", "run", "python", "-m", "storage_service" ]
|
||||
Reference in New Issue
Block a user