Generic `ruby` image with preinstalled `sass` gem.
6.3K
This Dockerfile builds image with sass.
This documentation assumes that an image is already available for download from Docker Hub. Alternatively, you can always build an image from the Dockerfile using docker build.
The image has the sass command available and it can be used to build image, which compiles Sass to CSS.
Given that you have directory sass with Sass files and directory css, where you want to store the compiled files,
you can run the command below. It will monitor the sass directory for changes and it will (re)compile the CSS files
in css.
$ docker run --rm -ti -v $(pwd)/sass:/sass -v $(pwd)/css:/css mpsorg/sass-compiler sass --watch /sass:/css
Give that you have Sass files, which you want to compile to CSS as part of a multi-stage build, you can use the image in your Dockerfile as a Sass compiler.
FROM mpsorg/sass-compiler AS sass-compiler
COPY sass /sass
RUN mkdir /css
RUN sass /sass:/css
FROM acme/app
COPY --from=sass-compiler /css /acme/app/public/css
All git tags should conform with the following pattern: sass-compiler-<MAJOR>.<MINOR>, where:
MAJOR - version with BC-breaking changes;MINOR - version with minor changes, i.e. new features, bug fixes.Content type
Image
Digest
Size
260.4 MB
Last updated
over 8 years ago
docker pull mpsorg/sass-compiler