Skip to content

Commit

Permalink
FIXUP: Do not use --no-root flag
Browse files Browse the repository at this point in the history
The `make test` command relies on importing the dangerzone library,
which is why we must do `poetry install` without the `--no-root` flag.

See: python-poetry/poetry#1868
  • Loading branch information
apyrgio committed Jan 10, 2023
1 parent 3aee9cb commit 9fd0fd4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev_scripts/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,18 @@
RUN echo user:2000:2000 > /etc/subuid
RUN echo user:2000:2000 > /etc/subgid
# XXX: We need the empty source folder, so that we can trick Poetry to create a
# link to the project's path. This way, we should be able to do `import
# dangerzone` from within the container.
RUN mkdir -p /home/user/dangerzone/dangerzone
RUN touch /home/user/dangerzone/dangerzone/__init__.py
USER user
WORKDIR /home/user
VOLUME /home/user/dangerzone
COPY pyproject.toml poetry.lock /home/user/dangerzone/
RUN cd /home/user/dangerzone && poetry install --no-root
RUN cd /home/user/dangerzone && poetry install
"""

DOCKERFILE_BUILD_DEBIAN_DEPS = r"""
Expand Down

0 comments on commit 9fd0fd4

Please sign in to comment.