This is a very simple, bare-bones NodeJS project created for you to use with Docker. This project has an error in it that we want to diagnose after the Docker image is built and run in a container
Note: This is only needed if you want to run the app locally. You don't need to install the dependencies or run the server if you are running the code inside a Docker container.
- Install dependencies:
npm install - Run server:
node server.js
- Build image:
docker build . - Run container with image:
docker run {image_id}whereimage_idcan be retrieved by runningdocker imagesand found under the columnIMAGE ID - You can use the
-dflag to run the container in the background. This will enable you to run other commands in your terminal while the container is running.
- Remove container:
docker kill {container_id}wherecontainer_idcan be retrieved by runningdocker psand found under the columnCONTAINER ID