Skip to content

Commit 238a0ad

Browse files
committed
🐳 Update Poetry install to avoid env conflicts
1 parent 421ba56 commit 238a0ad

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

{{cookiecutter.project_slug}}/backend/backend.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
33
WORKDIR /app/
44

55
# Install Poetry
6-
RUN pip install --no-cache-dir poetry && poetry config virtualenvs.create false
6+
RUN curl -sSL https://github.com/raw/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
7+
cd /usr/local/bin && \
8+
ln -s /opt/poetry/bin/poetry && \
9+
poetry config virtualenvs.create false
710

811
# Copy poetry.lock* in case it doesn't exist in the repo
912
COPY ./app/pyproject.toml ./app/poetry.lock* /app/

{{cookiecutter.project_slug}}/backend/celeryworker.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ FROM python:3.7
33
WORKDIR /app/
44

55
# Install Poetry
6-
RUN pip install --no-cache-dir poetry && poetry config virtualenvs.create false
6+
RUN curl -sSL https://github.com/raw/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
7+
cd /usr/local/bin && \
8+
ln -s /opt/poetry/bin/poetry && \
9+
poetry config virtualenvs.create false
710

811
# Copy poetry.lock* in case it doesn't exist in the repo
912
COPY ./app/pyproject.toml ./app/poetry.lock* /app/

{{cookiecutter.project_slug}}/backend/tests.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ FROM python:3.7
33
WORKDIR /app/
44

55
# Install Poetry
6-
RUN pip install --no-cache-dir poetry && poetry config virtualenvs.create false
6+
RUN curl -sSL https://github.com/raw/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
7+
cd /usr/local/bin && \
8+
ln -s /opt/poetry/bin/poetry && \
9+
poetry config virtualenvs.create false
710

811
# Copy poetry.lock* in case it doesn't exist in the repo
912
COPY ./app/pyproject.toml ./app/poetry.lock* /app/

0 commit comments

Comments
 (0)