Docker Classroom Series – 28/Sep/2019

Dockerfile instructions

INSTRUCTION ARGS

## Examples
FROM openjdk:8

RUN apt-get update
  • CMD and ENTRYPOINT:

    • These command execute when container is creating
    • CMD can be overritten
    • ENTRYPOINT cannot be overritten
  • How to get inside docker container

    • It is called as interactive mode
    • In two scenarios
      • While creating container docker container run -it image:tag <shellterminal>
        • docker container run -it alpine
        • docker container run -it ubuntu /bin/bash
        • To exit and stop the container execute command exit
        • TO exit and keep your container to be in running status Ctrl+p+q
      • while container is running
        • docker container exec -it <containerid>

Docker Container Lifecycle

Preview

Refer here the below image from scmgalaxy for better understanding

Excercise

  1. Manual Steps for gameoflife

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner