All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b776bf9)
* makes install available for all users in docker image
moves the installation path from /root/.local to a
virtualenv. this way we still get the lightweight
multistage build without excluding non-root users.
* adds changelog entry for docker-image fix
A changelog entry has been added under the Integration
subheader
* changes dockerfile to use the venv activate script
we are now using the inbuilt venv activate script, as well
as explicitly mentioning the binary location in the entrypoint
cmd.
Co-authored-by: Nicolò <nicolo.intrieri@spinforward.it>
Co-authored-by: Cooper Lees <me@cooperlees.com>
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Vim plugin: prefix messages with `Black: ` so it's clear they come from Black (#3194)
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Vim plugin: prefix messages with `Black: ` so it's clear they come from Black (#3194)
+- Docker: changed to a /opt/venv installation + added to PATH to be available to
+ non-root users (#3202)
RUN mkdir /src
COPY . /src/
RUN mkdir /src
COPY . /src/
-RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
+ENV VIRTUAL_ENV=/opt/venv
+RUN python -m venv $VIRTUAL_ENV
+RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setuptools wheel \
# Install build tools to compile dependencies that don't have prebuilt wheels
&& apt update && apt install -y git build-essential \
&& cd /src \
# Install build tools to compile dependencies that don't have prebuilt wheels
&& apt update && apt install -y git build-essential \
&& cd /src \
- && pip install --user --no-cache-dir .[colorama,d]
+ && pip install --no-cache-dir .[colorama,d]
FROM python:3-slim
# copy only Python packages to limit the image size
FROM python:3-slim
# copy only Python packages to limit the image size
-COPY --from=builder /root/.local /root/.local
-ENV PATH=/root/.local/bin:$PATH
+COPY --from=builder /opt/venv /opt/venv
+ENV PATH="/opt/venv/bin:$PATH"
+CMD ["/opt/venv/bin/black"]