Docker 101 for Developer
16
Docker 101 for Developer
-
Upload
sofian-hadiwijaya -
Category
Technology
-
view
158 -
download
1
Transcript of Docker 101 for Developer
• Linux based • Lightweight VM ( Container ) • Own Namespaces and Cgroups • Share resources with host system
What is Docker?
Dockerfile
FROM <image>
MAINTENER <name> RUN <command>
EXPOSE <port> ENV <key>=<value>
COPY <src>... <dest> VOLUME [“/data"]
WORKDIR
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