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.

  1. Open the package and go into the directory
  2. To build the image, download the file and go to directory. Then run:
    docker build -t test-image .
    
  3. To view the image:
    docker images
    
  4. To test the image:
    docker run -d -p 8080:8080 test-image
    
  5. You can now open the url http://localhost:8080/ and view “Hello World”.
  6. To connect to the container:
    docker exec -i -t test-image /bin/bash
    
  7. To remove the container
    1. Stop the container
       docker stop test-image
      
    2. Delete the container
       docker container rm test-image
      

ECS

EKS

Comments