Public Repository

Last pushed: 2 years ago
Short Description
A Libsass executable
Full Description

docker-libsass

A Libsass compiler

  • built on top of alpine base image
  • ~9 MB in size (5 MB alpine base + 4 MB sassc binary)

Versions

When pulling or running an this container you can select which version of Libsass you want to use.

latest

The current stable release

beta

The current beta release if it's newer than the current stable release. Otherwise this is the same as stable.

specific versions

The currently tagged versions are:

  • 3.1.0
  • 3.2.0-beta.5
  • 3.2.0-beta.6
  • 3.2.4
  • 3.3

Usage

The image has the sassc binary as its entrypoint, so it should be invoked with whatever arguments you would normally pass to sassc. For example,

$ cat file.scss
$blue: #00f;
.foo { color: $blue; }
$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) xzyfer/docker-libsass:<version> file.scss
.foo {
  color: #00f; }

You may also want to create a bash alias:

alias sassc="docker run -it --rm -v \$(pwd):\$(pwd) -w \$(pwd) xzyfer/docker-libsass:<version>"

so you will be able to simply run

$ sassc file.scss
.foo {
  color: #00f; }

Generating the binary

The binary is compiled as part of the Dockerfile, and the build tools are subsequently removed.

Credit

This was originally forked from bergknoff/Dockerfile

Docker Pull Command
Owner
xzyfer

Comments (0)