Skip to content

Instantly share code, notes, and snippets.

@jairoFernandez
Last active August 27, 2017 04:11
Show Gist options
  • Save jairoFernandez/6fc9d7a04435821489612e990095a086 to your computer and use it in GitHub Desktop.
Save jairoFernandez/6fc9d7a04435821489612e990095a086 to your computer and use it in GitHub Desktop.
DOCKER
# Detener todos los contenedores
$ docker stop $(docker ps -a -q)
# Borrar todos los contenedores
$ docker rm $(docker ps -a -q)
# Borrar todas las imagenes
$ docker rmi $(docker images -q)

Dockerfile

FROM node:6.9
MAINTAINER [email protected]
LABEL authors="Jairo Fdez <[email protected]>"

## prepare a user which runs everything locally! - required in child images!
RUN useradd --user-group --create-home --shell /bin/false app

ENV HOME=/usr/src/app
RUN mkdir $HOME
WORKDIR $HOME

RUN npm install -g @angular/[email protected] && npm cache clean

EXPOSE 4200
EXPOSE 49153

.dockerignore

node_modules
.git
.npm

Instructions

With docker

  docker-compose build 

 # In windows the route /c/Users/YOUR_USER/Folder_path_project/
docker run -ti --rm -v /home/YOUR_USER/Folder_path_project/:/usr/src/app -p 4200:4200 frontened_client-angular bash
 # first
 npm install
 # normal
   ng serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment