Step 9: Run the Sample Application with Docker

Build System Demo

Now that you have published your first Docker container with Chef Habitat, we can run the sample Node.js application locally using Docker *.

With Docker running, execute the following command on your machine:

$ docker pull your-docker-org/your-docker-repo
$ docker run --env HAB_LICENSE="accept-no-persist" -it -p 8000:8000 your-docker-org/your-docker-repo

Preview the application in your browser

After the container is running, you can open http://localhost:8000in your browser to view the sample app (see image).

*This step is optional and requires you to have Docker running on your local machine. If necessary, head over to the Docker website for insructions on installing Docker .