Skip to content

Commit bf2045c

Browse files
Ben Dickinsonthibaudcolas
authored andcommitted
Fix inability to install new dependencies via the devcontainer
1 parent c31add8 commit bf2045c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ FROM python:3.10
33
WORKDIR /app
44

55
RUN useradd --create-home dpl && \
6-
pip install "poetry>=1.1.12,<2" && \
7-
poetry config virtualenvs.create false
6+
mkdir -p /venv/ && \
7+
chown -R dpl:dpl /venv/ /app/
8+
9+
ENV PATH=/venv/bin:/home/dpl/.local/bin:$PATH \
10+
VIRTUAL_ENV=/venv/ \
11+
DJANGO_SETTINGS_MODULE=tests.settings.dev
12+
13+
USER dpl
14+
15+
RUN pip install --user "poetry>=1.1.12,<2" && \
16+
python -m venv /venv/
817

918
COPY pyproject.toml ./
1019
RUN poetry install --no-root
1120

12-
ENV DJANGO_SETTINGS_MODULE=tests.settings.dev \
13-
PYTHONPATH=.
14-
15-
USER dpl
1621
CMD django-admin runserver 0.0.0.0:8000

0 commit comments

Comments
 (0)