项目作者: itsziget

项目描述 :
Docker Image for Gulp, Ruby Compass and Bower
高级语言: Shell
项目地址: git://github.com/itsziget/docker-frontend-utils.git
创建时间: 2017-09-16T14:06:49Z
项目社区:https://github.com/itsziget/docker-frontend-utils

开源协议:

下载


(ARCHIVED) Docker image for frontend development

IMPORTANT: This repository is not developed anymore.
Since I began this project, components like Gulp, Compass and Bower have changed
or not even available anymore. Instructions below may not work in the future.

About the image

The image contains Gulp, Compass, Bower and some other dependencies like NodeJS (6.9), Ruby (2.3.3) and Sass.

You can use it to download client-side libraries via Bower, download NodeJS modules via npm, run Gulp tasks to generate CSS from SASS/SCSS sources
using compass or sass.

How to use it

You need Docker installed on your machine, and then you can run everything in a container.
In order to work with your project files, you have to go into your project root and mount
the directory into the container.

Run a command:

  1. docker run -it --rm -v $(pwd):$(pwd) --workdir=$(pwd) itsziget/frontend-utils COMMAND

Example:

  1. docker run -it --rm -v $(pwd):$(pwd) --workdir=$(pwd) itsziget/frontend-utils bower install

There are downloadable scripts you can copy into a directory in $PATH to use it as if that commands
were not inside a container.

Install NPM

  1. wget https://raw.githubusercontent.com/itsziget/docker-frontend-utils/master/host-scripts/npm.sh -O /usr/local/bin/npm && chmod +x /usr/local/bin/npm

Install Bower

  1. wget https://raw.githubusercontent.com/itsziget/docker-frontend-utils/master/host-scripts/bower.sh -O /usr/local/bin/bower && chmod +x /usr/local/bin/bower

Install Gulp

  1. wget https://raw.githubusercontent.com/itsziget/docker-frontend-utils/master/host-scripts/gulp.sh -O /usr/local/bin/gulp && chmod +x /usr/local/bin/gulp

Install SASS

  1. wget https://raw.githubusercontent.com/itsziget/docker-frontend-utils/master/host-scripts/sass.sh -O /usr/local/bin/sass && chmod +x /usr/local/bin/sass

Install Compass

  1. wget https://raw.githubusercontent.com/itsziget/docker-frontend-utils/master/host-scripts/compass.sh -O /usr/local/bin/compass && chmod +x /usr/local/bin/compass

These works only when you don’t need other directory than the one you are in. If you need work with other directories,
you create your own scripts and mount additional directories into the container:

  1. docker run -it --rm -v /my/additional/local/path:/my/additional/local/path -v $(pwd):$(pwd) --workdir=$(pwd) itsziget/frontend-utils gulp

Make sure the path on your host machine is the same as on guest.