Docker image for Sass/Scss compiler (dev environment) using Dart Sass
1.2K
Docker image for Sass/Scss compiler (development environment) using Dart Sass based on node:10.8.0-jessie.
Warning: --watch cannot be used, although sass has this flag (see sass -h)
You can check orianna-zzo/dockerfile-repo for Dockerfile and more building details.
The compressed size is 269MB (node image's size is 266MB). You can simply pull the latest image by:
$ docker pull orianna/dart-sass
Check the image, and this image is 680MB:
$ docker images
Run the docker container:
$ docker run --name my-sass -v $(pwd):/sass -v $(pwd)/css:/output --rm -it orianna/dart-sass:latest SOURCE.scss DIST.css
To simplify it, you can config alias in ~/.profile as follows:
alias sass="docker run -it --rm -v \$(pwd):/sass -v \$(pwd):/output orianna/dart-sass:latest"
With this alias, you can use the dart-sass image as if you use sass command locally:
$ sass SOURCE.scss DIST.css
$ sass -v
$ sass -h
If you want to use shell in the container interactively, you can enter:
$ docker run --name my-sass -v $(pwd):/sass -v $(pwd)/css:/output --rm -it --entrypoint sh orianna/sass:latest
Content type
Image
Digest
Size
256.8 MB
Last updated
about 8 years ago
docker pull orianna/dart-sass