Sign inSign up

mpsorg/sass-compiler

By mpsorg

•Updated over 8 years ago

Generic `ruby` image with preinstalled `sass` gem.

Image
0

6.3K

mpsorg/sass-compiler repository overview

⁠Sass

This Dockerfile builds image with sass⁠.

⁠Usage

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.

⁠CLI

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
⁠Dockerfile

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

⁠Versioning

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.

Tag summary

Content type

Image

Digest

Size

260.4 MB

Last updated

over 8 years ago

docker pull mpsorg/sass-compiler