Dockerfile for installing CoffeeScript 1.7.1 on Ubuntu 14.04
$ docker run -it --rm shouldbee/coffeescript coffee --version
$ docker run -it --rm shouldbee/coffeescript coffee
Make your code at docker host.
hello.coffee:
console.log("Hello World!")
Then you can run it by mounting with -w
option.
$ docker run -it --rm -v `pwd`:/pwd -w /pwd shouldbee/coffeescript coffee hello.coffee
Hello World!
Also you can compile it.
$ docker run -it --rm -v `pwd`:/pwd -w /pwd shouldbee/coffeescript coffee -c hello.coffee
Alias docker command in your .bashrc:
alias coffee="docker run -it --rm -v `pwd`:/pwd -w /pwd shouldbee/coffeescript coffee"