Containers on AWS
Dockerfile
For the purpose of the demo, I’m using the app package here It is a simple express.js hello world app.
- Open the package and go into the directory
- To build the image, download the file and go to directory. Then run:
docker build -t test-image .
- To view the image:
docker images
- To test the image:
docker run -d -p 8080:8080 test-image
- You can now open the url http://localhost:8080/ and view “Hello World”.
- To connect to the container:
docker exec -i -t test-image /bin/bash
- To remove the container
- Stop the container
docker stop test-image
- Delete the container
docker container rm test-image
- Stop the container
Comments