alejandrolacasa
5/28/2018 - 11:26 AM

[Docker notes] #Docker #tips #code

[Docker notes] #Docker #tips #code

Run node docker container

$ docker run -it node bash

Run node 6 docker container

$ docker run  -it node:6 bash

Run node alpine docker container (small container, no bash)

$ docker run -it node:alpine bash

Execute code inside a running container

$ docker exec -i -t <docker-id> bash

List containers available

$ docker ps

Mount current local folder in docker container

$ docker run -v ~/dev/hob-webshop-platform/frontend:/mnt -it node bash

Launch a Docker Compose image

$ docker-compose up

Launch Docker file in a local folder to create local Docker image (-t adds a nicer name to the Docker image)

$ docker build -t hob-platform/sting-frontend .

Stuff to know…