Skip to content

Commit

Permalink
build(docker): install node by copying files from official image
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhalili2006 committed Jun 7, 2024
1 parent 03c3292 commit e991b4b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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."

Expand All @@ -26,9 +32,6 @@ RUN apk add --no-cache \
gcc \
libffi-dev \
musl-dev \
nodejs \
npm \
yarn \
git \
git-email \
git-lfs \
Expand Down

0 comments on commit e991b4b

Please sign in to comment.