docker 101 for developer

16
Docker 101 for Developer

Upload: sofian-hadiwijaya

Post on 07-Jan-2017

158 views

Category:

Technology


1 download

TRANSCRIPT

Docker 101for Developer

Build Ship Run

• Linux based • Lightweight VM ( Container ) • Own Namespaces and Cgroups • Share resources with host system

What is Docker?

Why is Docker?

Command

Build

Dockerfile

Dockerfile

FROM <image>

MAINTENER <name> RUN <command>

EXPOSE <port> ENV <key>=<value>

COPY <src>... <dest> VOLUME [“/data"]

WORKDIR

Docker Hub

BUILD - Dockerfile• $ docker build . • $ docker pull eborass/laravel

RUN

RUN - Dockerfile$ docker run [OPTIONS] IMAGE [COMMAND] [ARG...] • -d = detach • —name = naming the container • -it = interactive shell • —rm = automatically clean up the container and

remove the file system when the container exits • -v = mounting volume • -p = port

Kitematics

KITEMATICS