]> git.madduck.net Git - etc/vim.git/blobdiff - Dockerfile

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Bump peter-evans/find-comment from 2.0.0 to 2.0.1 (#3353)
[etc/vim.git] / Dockerfile
index a03d23a10782f09ea291c3a67880a758a5bef692..4e8f12f97981accfe603e03f368fbe98d4c7cea5 100644 (file)
@@ -1,8 +1,19 @@
-FROM python:3
+FROM python:3-slim AS builder
 
 
-ENV PYTHONDONTWRITEBYTECODE 1
-ENV PYTHONUNBUFFERED 1
+RUN mkdir /src
+COPY . /src/
+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 \
+    && pip install --no-cache-dir .[colorama,d]
 
 
-RUN pip install --upgrade --no-cache-dir black
+FROM python:3-slim
 
 
-ENTRYPOINT /usr/local/bin/black --check --diff  .
+# copy only Python packages to limit the image size
+COPY --from=builder /opt/venv /opt/venv
+ENV PATH="/opt/venv/bin:$PATH"
+
+CMD ["/opt/venv/bin/black"]