docker build -f Dockerfile-base . -t "ubuntu16.04-updated" --no-cache
docker tag ubuntu16.04-updated notaorg/nota-ubuntu-16.04:latest
docker push notaorg/nota-ubuntu-16.04:latest
docker build --target deployment -t notaorg/nota-dev:latest .
docker run <image-id> node bin/www
sudo docker-compose run <service-name> bash
Run as the user id specified and mount a volume of our project to the working
directory of the container so that we make edits to the files in the container
or on the host. Note that in our docker-compose.yml
file, we put a "depends link"
for Nota to require the MongoDB container to start (before Nota). This way we don't
need to specify the MongoDB container to start when we run the command below.
docker-compose run --user="$(id -u)" --service-ports -v $(pwd):/home/backenduser/app nota bash