docker build --tag nest-docker .
and run docker with docker run --publish PORT:3000 nest-docker
If you don't want to attach the terminal run docker run --detach --publish PORT:3000 nest-docker
Run with a target parameter for an environment
docker build --target dev --tag nest-docker .
- Build your container
docker-compose up --build
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres