Skip to content

Commit

Permalink
Set sass 3.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnau Siches committed Oct 3, 2015
0 parents commit 6f1cbfe
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -0,0 +1 @@
.git
17 changes: 17 additions & 0 deletions Dockerfile
@@ -0,0 +1,17 @@
FROM alpine:3.2
MAINTAINER Arnau Siches <arnau@ustwo.com>

ENV SASSC_VERSION=3.2.5 \
LIBSASS_VERSION=3.2.5 \
SASS_LIBSASS_PATH=/usr/local/libsass-$LIBSASS_VERSION

COPY build.sh /build.sh
RUN /build.sh

RUN adduser -D ustwo \
&& addgroup ustwo ustwo

WORKDIR /home/ustwo

ENTRYPOINT ["/usr/local/bin/sassc"]
CMD ["-v"]
28 changes: 28 additions & 0 deletions Makefile
@@ -0,0 +1,28 @@
.PHONY: build shell test version

image_name := ustwo/sass

build:
@docker build -t $(image_name) .

shell:
@docker run --rm -it --entrypoint=/bin/sh $(image_name)

version:
@docker run --rm -t $(image_name)

test: test-001 test-002

test-001:
@docker run --rm -t \
-v $(PWD)/tests:/home/ustwo/tests \
$(image_name) \
--style compressed \
tests/test-001.sass

test-002:
@docker run --rm -t \
-v $(PWD)/tests:/home/ustwo/tests \
$(image_name) \
--style compressed \
tests/test-002.scss
25 changes: 25 additions & 0 deletions README.md
@@ -0,0 +1,25 @@
# ustwo sassc

This image is based on [Alpine](https://alpinelinux.org) to ensure a small base
image.

## Versions

* 3.2.5, latest

## Assumptions

* Workdir: `/home/ustwo`.

## Usage

$ docker run --rm -t \
-v $(PWD)/input.scss:/home/ustwo/input.scss \
ustwo/sass:3.2.5 \
--sourcemap \
--style compressed \
input.scss output.css

## Maintainers

* [Arnau Siches](mailto:arnau@ustwo.com)
30 changes: 30 additions & 0 deletions build.sh
@@ -0,0 +1,30 @@
#! /bin/sh

set -e

SASSC_VERSION=3.2.5
LIBSASS_VERSION=3.2.5
SASS_LIBSASS_PATH=/usr/local/libsass-$LIBSASS_VERSION

apk add --update \
curl \
g++ \
make
rm -rf /var/cache/apk/*

cd /usr/local

# Fetch
curl -L https://github.com/sass/libsass/archive/$LIBSASS_VERSION.tar.gz | tar xvz
curl -L https://github.com/sass/sassc/archive/$SASSC_VERSION.tar.gz | tar xvz

# Compile
cd /usr/local/sassc-$SASSC_VERSION
make

# Clean
cp /usr/local/sassc-$SASSC_VERSION/bin/sassc /usr/local/bin/sassc
rm -rf /usr/local/sassc-$SASSC_VERSION \
/usr/local/libsass-$LIBSASS_VERSION

apk del curl make
2 changes: 2 additions & 0 deletions tests/test-001.sass
@@ -0,0 +1,2 @@
#test-001
color: green
3 changes: 3 additions & 0 deletions tests/test-002.scss
@@ -0,0 +1,3 @@
#test-002 {
color: green;
}

0 comments on commit 6f1cbfe

Please sign in to comment.