Giter Club home page Giter Club logo

ember-docker's Introduction

Docker image for Ember CLI, PhantomJS and Bower command-line tools

This is a Docker image for Ember, PhantomJS and Bower, based on an image intended for use in the fashion described on @dylanlindgren's series of blog articles about using Docker and the Laravel PHP framework together (Docker for the Laravel framework, and Beautiful Laravel Development with Docker & Fig).

An automated build for this repo is available on the Docker Hub.

Contents

  • Usage
  • Building the image
  • Notes
  • About

Usage

Ember, PhantomJS and Bower commands should be run within the container as the current user. Get the user ID of the current user using the following command:

$ id -u
1000  

In the following commands, replace <UID> with whatever figure was returned (e.g. 1000 in the example above).

Running an Ember CLI command in the current directory:

$ sudo docker run --rm -p 4200:4200 -v $(pwd):/data -w /data \
  -u <UID> -e HOME=/data sebp/ember *your Ember CLI commands here*

Running a PhantomJS command in the current directory:

$ sudo docker run --rm -v $(pwd):/data -w /data \
  -u <UID> --entrypoint phantomjs sebp/ember *your PhantomJS commands here*

Running a Bower command in the current directory:

$ sudo docker run --rm -v $(pwd):/data -w /data \
  -u <UID> --entrypoint bower sebp/ember *your Bower commands here*

For the sake of sanity, it is strongly recommended to create aliases, e.g.:

alias dember='sudo docker run ... sebp/ember'
alias dphantomjs='sudo docker run ... sebp/phantom'
alias dbower='sudo docker run ... sebp/bower'

To avoid recreating these aliases each time you start a new shell session, either add these lines to one of your shell's start-up files (e.g. ~/.bashrc for Bash), or create a shell script with these three lines (e.g. ~/ember-aliases.sh) and source it (i.e. source ~/ember-aliases.sh or . ~/ember/aliases.sh) when you need to use the aliases.

Building the image

To rebuild this image with Docker Compose, use the supplied docker-compose.yml, and run:

$ sudo docker-compose build

Notes

This image works well with the below related images.

About

Adapted by Sébastien Pujadas from @dylanlindgren's Docker image for Bower, released under the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.