Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Docker 101 - from 0 to Docker in 30 minutes

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
presentation on Docker
presentation on Docker
Chargement dans…3
×

Consultez-les par la suite

1 sur 44 Publicité

Docker 101 - from 0 to Docker in 30 minutes

Télécharger pour lire hors ligne

Docker 101: an introduction to Docker. The presentation introduces the Docker fundamentals, including LXC Containers and other tools of the Docker ecosystem.

Docker 101: an introduction to Docker. The presentation introduces the Docker fundamentals, including LXC Containers and other tools of the Docker ecosystem.

Publicité
Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)

Les utilisateurs ont également aimé (20)

Publicité

Similaire à Docker 101 - from 0 to Docker in 30 minutes (20)

Plus récents (20)

Publicité

Docker 101 - from 0 to Docker in 30 minutes

  1. 1. # Version: 0.0.1 FROM ubuntu:14.04 MAINTAINER Rocky Balboa "rocky@gmail.com" RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 RUN echo 'deb http://download-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /e RUN apt-get update # note the -y flag, for non interactive RUN apt-get install -y mongodb-org RUN mkdir -p /data/db # This mongo instance will run in a container # so it must be configured to accept connections from foreign hosts RUN echo "bind_ip = 0.0.0.0" >> /etc/mongdodb.conf EXPOSE 27017 # Set the default command for this image CMD ["mongod"]
  2. 2. docker build -t="balboa/mongo" .
  3. 3. $ create --driver virtualbox dev # start machine locally using virtualbox $ create --driver digitalocean dev-cloud # start machine locally using digitalocean
  4. 4. $ docker search # search hub.docker.com for an image $ docker pull # download an image $ docker images # list all existing local images $ docker run # starts a container from an image $ docker ps # list running containers $ docker build # build an image from a docker file
  5. 5. -d # runs the container in detached mode (background process) -t # runs the container using a pseudo-tty -i # uses interactive mode --name # assign a name, instead of autogenerated one
  6. 6. docker stop # stops a container docker start # starts a container docker attach # attach to a container docker remove # remove a container docker rmi # remove an image
  7. 7. $ docker run -d --name database -e MYSQL_ROOT_PASSWORD=root mysql $ docker run -d --link database:db --name web runseb/hostname $ docker run -d --link web:application --name lb nginx
  8. 8. $ docker run -ti -v "$PWD":/shared ubuntu:14.04 /bin/bash

×