Khoa Bui's Website

Resume

Linkedin

Github

Academic Works

Contact Me

Notes

Containers

How to build and run a container?

  1. Create a Docker file with the following name .Dockerfile with the content:
    FROM [initializes a new build stage and sets the base image for subsequent instructions]
    RUN [execute any commands to create a new layer on top of the current image]
    CMD [sets the command to be executed when running a container from an image]
    
  2. Build the container:
    docker build  -f <name>.Dockerfile -t <tag-list>
    
  3. Run the container:
    docker run --rm httpie