From 2e7db70e2df0a43ef38b0cf3f20e68a7f40e0260 Mon Sep 17 00:00:00 2001 From: Douglas Silva Date: Mon, 2 May 2022 18:37:49 -0300 Subject: [PATCH] Add documentation for using it with Docker (#1684) Co-authored-by: Natalie Weizenbaum --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 932e0e264..9f151d44c 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ A [Dart][dart] implementation of [Sass][sass]. **Sass makes CSS fun again**. * [From Pub](#from-pub) * [`sass_api` Package](#sass_api-package) * [From Source](#from-source) + * [In Docker](#in-docker) * [Why Dart?](#why-dart) * [Compatibility Policy](#compatibility-policy) * [Browser Compatibility](#browser-compatibility) @@ -184,6 +185,23 @@ Assuming you've already checked out this repository: That's it! +### In Docker + +You can install and run Dart Sass within Docker using the following Dockerfile +commands: + +```Dockerfile +# Dart stage +FROM dart:stable AS dart + +COPY --from=another_stage /app /app + +WORKDIR /dart-sass +RUN git clone https://github.com/sass/dart-sass.git . && \ + dart pub get && \ + dart ./bin/sass.dart /app/sass/example.scss /app/public/css/example.css +``` + ## Why Dart? Dart Sass has replaced Ruby Sass as the canonical implementation of the Sass