Skip to content

Run a docker to build node project

Requirements

Docker is installed.

Start a docker and mount the project

  1. Run the docker run command to start a container.

    Bash
    docker run -d \
    -it \
    --name nodebuild \
    --mount type=bind,source="$(pwd)"/target,target=/app \
    node:latest
    
  1. Start a docker container shell

    docker exec -it nodebuild bash

  2. Then go to folder app and build it