Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 739 Bytes

image-layer.md

File metadata and controls

57 lines (45 loc) · 739 Bytes

Testing Image Layer

1- Pull a Docker image:

$ docker pull alpine

2- Run a Docker image in iterative mode:

$ docker run -it alpine

3- Create a file:

$ touch /home/new-file.txt && exit

4- Show the container id:

$ docker ps -a

5- Commit the container id:

$ docker commit CONTAINER_ID

6- Show the new image id:

$ docker images

7- Tag the new image id:

$ docker tag IMAGE_ID dmoutinho/new-alpine

8- Push a new image to registry:

$ docker push dmoutinho/new-alpine

9- Delete a new image:

$ docker image rm dmoutinho/new-alpine

10- Run a new image:

$ docker run -it dmoutinho/new-alpine

11- List files:

$ ls /home && exit