]> 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:

chore: dump docs deps and pre-commit hooks (#2676)
[etc/vim.git] / Dockerfile
index 9542479eca56e9c03ba29d0ac5123ee8e0d3a2c7..c393e29f6320e951f155d137264f8798c317555f 100644 (file)
@@ -1,14 +1,17 @@
-FROM python:3-slim
+FROM python:3-slim AS builder
 
 RUN mkdir /src
 COPY . /src/
 RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
-    && apt update && apt install -y git \
+    # 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] \
-    && rm -rf /src \
-    && apt remove -y git \
-    && apt autoremove -y \
-    && rm -rf /var/lib/apt/lists/*
+    && pip install --user --no-cache-dir .[colorama,d]
+
+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
 
 CMD ["black"]