Sign inSign up

shilazi/node-sass-dind-builder

By shilazi

•Updated over 2 years ago

https://github.com/sass/node-sass

Image
0

188

shilazi/node-sass-dind-builder repository overview

⁠Node Sass DIND Builder

Using DIND to compile and generate prebuilt binaries for node-sass⁠, such as prebuilt binaries for ARM64 CPUs.

⁠Dockerfile

# syntax=docker/dockerfile:1.4

ARG DOCKER_VERSION=25.0.4
FROM docker.io/library/docker:${DOCKER_VERSION}-git

RUN apk add --no-cache bash

ENV DEBUG_MODE=0 \
    SASS_NODE_PAIRS= \
    RSYNC_USER= \
    RSYNC_PASSWORD= \
    RSYNC_SASS_DEST= \
    PY3_DOWNLOAD_URL=https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz \
    NODEJS_ORG_MIRROR=https://mirrors.ustc.edu.cn/node \
    NPM_REGISTRY_MIRROR=https://registry.npmmirror.com \
    SASS_SRC_SITE= \
    SASS_GIT_REPO=https://github.com/sass/node-sass \
    REPOSITORY=docker.io \
    BUILDKIT_TAG=v0.13.0 \
    PLATFROM=linux/arm64 \
    DOCKER_OPTS= \
    # https://www.debian.org/distrib/archive.en.html \
    DEBIAN_ARCHIVE_MAX_VERSION=9 \
    PATH=/build:$PATH

WORKDIR /build

# https://hub.docker.com/r/docker/dockerfile
COPY --chmod=755 <<-"eoe" entrypoint.sh
Omit...
eoe

COPY --chmod=755 <<-"eob" build.sh
Omit...
eob

COPY --chmod=755 <<-"eor" rsync.sh
Omit...
eor

ENTRYPOINT []

CMD ["bash", "entrypoint.sh"]

⁠Usage

docker run --rm -it \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e "SASS_NODE_PAIRS=8.0.0+14:16" \
    -e "RSYNCD_SASS_DEST=a.b.c.d::npm/node-sass/" \
    shilazi/node-sass-dind-builder:25.0.4-git

Full SASS_NODE_PAIRS was:

8.0.0+14:16:18 \
7.0.3+12:14:16 \
7.0.2+12:14:16 \
7.0.1+12:14:16 \
7.0.0+12:14:16 \
6.0.1+12:14:16 \
6.0.0+12:14:16 \
5.0.0+10:12:14 \
4.14.1+10:12:14 \
4.14.0+10:12:14 \
4.13.1+10:12 \
4.13.0+10:12 \
4.12.0+10:12 \
4.11.0+10 \
4.10.0+10 \
4.9.4+10 \
4.9.3+10 \
4.9.2+10 \
4.9.1+10 \
4.9.0+10
⁠Environment
NameNoteDefaultExample
DEBUG_MODE0 disable,1 enable01
SASS_NODE_PAIRSthe pair of node-sass and nodejs, format:
sass_tag+node_v1:node_v2
""8.0.0+14:16
RSYNC_USERrsync auth username""user
RSYNC_PASSWORDrsync auth password""password
RSYNC_SASS_DESTrsyncd target host and path""a.b.c.d::npm/node-sass/
PY3_DOWNLOAD_URLpy36 src download urlhttps://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz⁠
NODEJS_ORG_MIRRORdist host of npm installhttps://mirrors.ustc.edu.cn/node⁠
NPM_REGISTRY_MIRRORregistry host of npm installhttps://registry.npmmirror.com⁠
SASS_SRC_SITEnode-sass github release src download url""http://a.b.c.d/node-sass/⁠
SASS_GIT_REPOnode-sass git clone urlhttps://github.com/sass/node-sass⁠
REPOSITORYthe image repository of buildkit and nodejsdocker.io
BUILDKIT_TAGthe buildkit image tagv0.13.0
PLATFROMDIND build --platform optionlinux/arm64
DOCKER_OPTSDIND build other opts""--no-cache

Tag summary

Content type

Image

Digest

sha256:c06f23a70…

Size

121.2 MB

Last updated

over 2 years ago

docker pull shilazi/node-sass-dind-builder:25.0.4-git