diff --git a/docker/Dockerfile b/docker/Dockerfile index 85de83e..4c81aa9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,12 +1,18 @@ # syntax=docker/dockerfile:1 +FROM python:3.12-alpine AS buildkit # Instead of using Alpine base image and then installing Python from pkgs.al.o, # we'll go with the official images instead. -FROM python:3.12-alpine AS buildkit # Since hadolint isn't in the package repos for Alpine yet, we'll copying from the offical # Docker image instead. COPY --from=ghcr.io/hadolint/hadolint:latest-alpine /bin/hadolint /usr/bin/hadolint +# Copy build artifacts from official node image into here +ENV YARN_VERSION 1.22.22 +COPY --from=node:20-alpine /opt/yarn-v$YARN_VERSION/bin/ /usr/local/bin/ +COPY --from=node:20-alpine /usr/local/bin/node /usr/local/bin/node +COPY --from=node:20-alpine /usr/lib/node_modules/ /usr/lib/node_modules/ + ENV PACKAGES=/usr/local/lib/python3.11/site-packages PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin PYTHONDONTWRITEBYTECODE=1 LABEL org.opencontainers.image.description="GitLab CI image for custom mkdocs-material Docker image, alongside tools @ajhalili2006 use." @@ -26,9 +32,6 @@ RUN apk add --no-cache \ gcc \ libffi-dev \ musl-dev \ - nodejs \ - npm \ - yarn \ git \ git-email \ git-lfs \