SlideShare a Scribd company logo
5
Most read
6
Most read
12
Most read
Introduce
DOCKER
2017.05.29
JuneyoungOh
<jyoh@i-on.net>
Purpose of presentation
- Concept of docker
- Image & Container
- Get familiar with docker cmd
- Modify docker daemon
- Writing Dockerfile
- docker Pros & Cons
- Think how to apply
What is Docker?
Host system
Individual systems
Official :
- Virtual environment which is
much lighter and faster than
before
What I felt :
- It is Okay to being mess up in
the container :D
- easy to add/remove new
service
Server
How we using it
docker system structure
LOCAL
docker hub
Download image
Upload image
로컬에 저
장
Generate
container form
image
Update image
from container
[ image ]
- immutable
- able to upload to docker hub
[ container ]
- mutable
- unable to upload to docker
hub
- unless save as an image, all
progress can be disappeared
Get familiar with docker cmd 1 :
Download and do some work
docker pull centos:latest
- Download docker
image form hub 로부
터 이미지를
- <image name>:<tag
name>
docker run -d --name=test centos:latest
- build a container form image
- -d / --detach : run as daemon
command
- --name : assign a name to container.
If do not add this option, have to
control container with container ID,
which is very annoying
docker exec -it test /bin/bash
- attach to the container
- -i : interactive
- -t : tty mode
- the last parameter is what
to execute on run
Get familiar with docker cmd 2 :
Upload the image
docker commit test testimg
- generate new image from the
container
- parameter #1 : container name
or ID
- parameter #2 : new name for the
image
1. docker tag testimg juneyoungoh/education:test
- assign a tag to the image
- parameter #2 :
<dockerhub username>/<repo_name>:<tag name>
- docker login is required
2. docker push juneyoungoh/education:test
- upload new image to the hub
- parameter #1 : parameter #2 of step 1
Get familiar with docker cmd 2 :
Managing and Debugging
[ Image & Container ]
List local docker lmages : docker images
List local docker containers : docker ps
Copy a file to docker container from host system :
docker cp <Host file location> <Docker container ID>:<Path inside of the container>
Remove the container : docker rm <Container ID>
Stop/Start the container : docker stop/start <Container ID>
Remove the image : docker rmi <Image ID>
Get familiar with docker cmd 3 :
Managing and Debugging
[ Debugging ]
Case1. Want to watch the container logs in some reason
- docker logs <Container ID>
Case2. docker daemon became <defunc> state
- Have to reboot your system. Since docker daemons parent is 1, there is no other way to fix it.
Modify docker daemon
Case A.
Have to move docker root from /var/lib to /data.
- Have to edit daemon.json (If there is no daemon.json in /etc/docker, you can just generate new one)
- daemon.json Official
Case B.
So I copied the entire linux default, but it do not working at all
- stackoverflow answer
- Have to remove other elements from the json.
Modify docker daemon
:OSX
1. Go to Preferences
2. Go to Advanced Tab and
write what we saw in previous
page
Writing Dockerfile
docker build -t test .
- put a tag name after ‘-t’
- Can replace ‘.’ to the directory where
the Docker file is
Dockerfile ?
- Basically a shell script
- Define actions to execute
- For instance, when I type `docker run`, it will
automatically install JDK and Tomcat.
Dockerfile Informations
[ Dockerfile Keywords ]
- FROM : Every Dockerfile starts with this keyword. Put the image name after the keyword which to be
a base image of yours. ex> FROM centos
- ARG : When docker build , able to get parameters. You can use something like --build-arg <ARG
name>=<value>
- ENV : Environment variables for the docker image. i.e> JAVA_HOME, CATALINA_HOME
- RUN : Will executed when we `build`
- EXPOSE : port to be exposed to the host
- VOLUME : Define shared volumes
- CMD : Will executed when `docker run`
Using Dockerfile
[ Dockerfile ]
CASE A.
Peter writes a Dokerfile like below. He expected to working since `build` and `run` command succeed. But
whe he type `docker ps`, the status is `Exited`. What is wrong with this file?
StackOverflow answer
Pros & Cons
Pros
- Does not effect to host system
- Easy to deploy if you have a decent Dockerfile
- Image layer system
Cons
- The man who set the config, should know lot of different system.
- It is hard to handle when daemon turns into <defunc> state
Extra. Using Docker hub
How to use
1. Login docker hub
2. Create Repository +
3. `docker tag` on local
4. `docker push` on local
Question. How to use
Dockerfile tabs in GUI
1. It is for paid users
2. In alternative way, you
can link your git.
● redmine could be a good sample for free users
References
- docker Official
- pyrasis - 도커 무작정 따라하기 : Korean document
- Sample Docker Hub project
- GitHub repos for this presentation

More Related Content

PPTX
Introduction to Docker
PPTX
Docker Basics
PDF
Docker Introduction
PDF
Introduction to Docker
PPTX
Docker intro
PPTX
Docker 101 : Introduction to Docker and Containers
PPTX
Docker introduction (1)
PPTX
Docker: From Zero to Hero
Introduction to Docker
Docker Basics
Docker Introduction
Introduction to Docker
Docker intro
Docker 101 : Introduction to Docker and Containers
Docker introduction (1)
Docker: From Zero to Hero

What's hot (20)

PDF
PDF
Introduction to Docker
PPTX
Docker introduction
PDF
Introduction to docker
PPTX
Getting started with Docker
PDF
Introduction to container based virtualization with docker
PPT
Docker introduction
PPTX
Docker 101 - Nov 2016
PDF
Introduction to Docker storage, volume and image
PDF
Docker Birthday #3 - Intro to Docker Slides
PDF
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
PDF
Dockerfile
PDF
Intro to containerization
PPTX
What is Docker
PDF
Docker in real life
PDF
Intro docker
PDF
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
PPTX
Docker introduction &amp; benefits
PPTX
Introduction to docker
Introduction to Docker
Docker introduction
Introduction to docker
Getting started with Docker
Introduction to container based virtualization with docker
Docker introduction
Docker 101 - Nov 2016
Introduction to Docker storage, volume and image
Docker Birthday #3 - Intro to Docker Slides
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Dockerfile
Intro to containerization
What is Docker
Docker in real life
Intro docker
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker introduction &amp; benefits
Introduction to docker
Ad

Similar to Docker introduction for the beginners (20)

PDF
Docker by Example - Basics
PPTX
Docker Starter Pack
PDF
Docker by Example - Basics
PPTX
Primi passi con Docker - ItalianCoders - 12-01-2021
PPTX
Powercoders · Docker · Fall 2021.pptx
PDF
A Hands-on Introduction to Docker
PPTX
PDF
Introduction To Docker
PPTX
PDF
Docker Introduction.pdf
PDF
Docker, but what it is?
PPTX
PDF
Docker.pdf
PDF
Docker use dockerfile
PDF
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
PDF
Docker Essentials Workshop— Innovation Labs July 2020
PPTX
Docker 101
PDF
Docker 101 2015-05-28
PPTX
Docker introduction
PPTX
Docker Introductory workshop
Docker by Example - Basics
Docker Starter Pack
Docker by Example - Basics
Primi passi con Docker - ItalianCoders - 12-01-2021
Powercoders · Docker · Fall 2021.pptx
A Hands-on Introduction to Docker
Introduction To Docker
Docker Introduction.pdf
Docker, but what it is?
Docker.pdf
Docker use dockerfile
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Docker Essentials Workshop— Innovation Labs July 2020
Docker 101
Docker 101 2015-05-28
Docker introduction
Docker Introductory workshop
Ad

More from Juneyoung Oh (7)

PPTX
Docker 사내교육 자료
PPTX
휴봇-슬랙 OSX 설치
PPTX
How to build a slack-hubot with js
DOCX
Github 의 release 기능
PPTX
Html5 canvas6 week6n7n8
PPTX
Html5 canvas study week1n2
PPTX
Tizen installation guide for OSX
Docker 사내교육 자료
휴봇-슬랙 OSX 설치
How to build a slack-hubot with js
Github 의 release 기능
Html5 canvas6 week6n7n8
Html5 canvas study week1n2
Tizen installation guide for OSX

Recently uploaded (20)

PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Google’s NotebookLM Unveils Video Overviews
PDF
Modernizing your data center with Dell and AMD
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
How to Build Crypto Derivative Exchanges from Scratch.pptx
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
PDF
ai-archetype-understanding-the-personality-of-agentic-ai.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
NewMind AI Weekly Chronicles - August'25 Week I
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
A Day in the Life of Location Data - Turning Where into How.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Google’s NotebookLM Unveils Video Overviews
Modernizing your data center with Dell and AMD
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Dell Pro 14 Plus: Be better prepared for what’s coming
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Enable Enterprise-Ready Security on IBM i Systems.pdf
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
How to Build Crypto Derivative Exchanges from Scratch.pptx
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
ai-archetype-understanding-the-personality-of-agentic-ai.pdf

Docker introduction for the beginners

  • 2. Purpose of presentation - Concept of docker - Image & Container - Get familiar with docker cmd - Modify docker daemon - Writing Dockerfile - docker Pros & Cons - Think how to apply
  • 3. What is Docker? Host system Individual systems Official : - Virtual environment which is much lighter and faster than before What I felt : - It is Okay to being mess up in the container :D - easy to add/remove new service
  • 5. docker system structure LOCAL docker hub Download image Upload image 로컬에 저 장 Generate container form image Update image from container [ image ] - immutable - able to upload to docker hub [ container ] - mutable - unable to upload to docker hub - unless save as an image, all progress can be disappeared
  • 6. Get familiar with docker cmd 1 : Download and do some work docker pull centos:latest - Download docker image form hub 로부 터 이미지를 - <image name>:<tag name> docker run -d --name=test centos:latest - build a container form image - -d / --detach : run as daemon command - --name : assign a name to container. If do not add this option, have to control container with container ID, which is very annoying docker exec -it test /bin/bash - attach to the container - -i : interactive - -t : tty mode - the last parameter is what to execute on run
  • 7. Get familiar with docker cmd 2 : Upload the image docker commit test testimg - generate new image from the container - parameter #1 : container name or ID - parameter #2 : new name for the image 1. docker tag testimg juneyoungoh/education:test - assign a tag to the image - parameter #2 : <dockerhub username>/<repo_name>:<tag name> - docker login is required 2. docker push juneyoungoh/education:test - upload new image to the hub - parameter #1 : parameter #2 of step 1
  • 8. Get familiar with docker cmd 2 : Managing and Debugging [ Image & Container ] List local docker lmages : docker images List local docker containers : docker ps Copy a file to docker container from host system : docker cp <Host file location> <Docker container ID>:<Path inside of the container> Remove the container : docker rm <Container ID> Stop/Start the container : docker stop/start <Container ID> Remove the image : docker rmi <Image ID>
  • 9. Get familiar with docker cmd 3 : Managing and Debugging [ Debugging ] Case1. Want to watch the container logs in some reason - docker logs <Container ID> Case2. docker daemon became <defunc> state - Have to reboot your system. Since docker daemons parent is 1, there is no other way to fix it.
  • 10. Modify docker daemon Case A. Have to move docker root from /var/lib to /data. - Have to edit daemon.json (If there is no daemon.json in /etc/docker, you can just generate new one) - daemon.json Official Case B. So I copied the entire linux default, but it do not working at all - stackoverflow answer - Have to remove other elements from the json.
  • 11. Modify docker daemon :OSX 1. Go to Preferences 2. Go to Advanced Tab and write what we saw in previous page
  • 12. Writing Dockerfile docker build -t test . - put a tag name after ‘-t’ - Can replace ‘.’ to the directory where the Docker file is Dockerfile ? - Basically a shell script - Define actions to execute - For instance, when I type `docker run`, it will automatically install JDK and Tomcat.
  • 13. Dockerfile Informations [ Dockerfile Keywords ] - FROM : Every Dockerfile starts with this keyword. Put the image name after the keyword which to be a base image of yours. ex> FROM centos - ARG : When docker build , able to get parameters. You can use something like --build-arg <ARG name>=<value> - ENV : Environment variables for the docker image. i.e> JAVA_HOME, CATALINA_HOME - RUN : Will executed when we `build` - EXPOSE : port to be exposed to the host - VOLUME : Define shared volumes - CMD : Will executed when `docker run`
  • 14. Using Dockerfile [ Dockerfile ] CASE A. Peter writes a Dokerfile like below. He expected to working since `build` and `run` command succeed. But whe he type `docker ps`, the status is `Exited`. What is wrong with this file? StackOverflow answer
  • 15. Pros & Cons Pros - Does not effect to host system - Easy to deploy if you have a decent Dockerfile - Image layer system Cons - The man who set the config, should know lot of different system. - It is hard to handle when daemon turns into <defunc> state
  • 16. Extra. Using Docker hub How to use 1. Login docker hub 2. Create Repository + 3. `docker tag` on local 4. `docker push` on local Question. How to use Dockerfile tabs in GUI 1. It is for paid users 2. In alternative way, you can link your git. ● redmine could be a good sample for free users
  • 17. References - docker Official - pyrasis - 도커 무작정 따라하기 : Korean document - Sample Docker Hub project - GitHub repos for this presentation

Editor's Notes