Docker is an containerization platform allows to deliver software is packages called containers.
- Docker Overview (Coming soon)
- Docker Compose
- Docker Swarm
- Docker Service
- Docker Stack
What is the difference between Docker file, image and container
When I started reading about Docker, I was confused about the relationship between Docker file vs docker image vs docker container !
Short answer to my question is:
1. Docker file is where I need to script my steps on what actions to be done before I make a docker image.
a sample docker file as below: here below in the code, I am pulling JDK environment in line 1. copying a java class to app directory in line 2, setting app as working directory in line 3 for my docker container after i convert image to container. Then finally running my app in line 4.
COPY HelloWorl.class /app/
2. Docker image is created using the above docker file by building it. (command : docker build -t myhelloworldapp . )
3. then spin up the container by using command : docker run myhelloworldapp