Skip to content

Instantly share code, notes, and snippets.

@entyo
Last active September 16, 2017 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save entyo/eadf1e3136cd70930b18828f3d5d196b to your computer and use it in GitHub Desktop.
Save entyo/eadf1e3136cd70930b18828f3d5d196b to your computer and use it in GitHub Desktop.
angular-cliをやっていきするためのDockerfile
FROM node:latest
# prepare a user which runs everything locally! - required in child images!
RUN useradd --user-group --create-home --shell /bin/false app
ENV HOME=/home/app
WORKDIR $HOME
RUN npm install -g yarn@1.0.2 && yarn global add @angular/cli@latest && yarn cache clean
EXPOSE 4200
docker build -t angular-cli .
docker run -it --rm --name create-angular-project -v "$PWD":/home/app angular-cli:latest ng set --global packageManager=yarn
docker run -it --rm --name create-angular-project -v "$PWD":/home/app angular-cli:latest ng new --skip-install WebAudioHandsOn
cd WebAudioHandsOn
docker run -it --rm --name create-angular-project -v "$PWD":/home/app angular-cli:latest yarn install
docker run -it --rm --name create-angular-project -v "$PWD":/home/app angular-cli:latest ng serve
@entyo
Copy link
Author

entyo commented Sep 16, 2017

Windowsのオタクは&&で死ぬ可能性がある

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment