Archives de catégorie : docker

5) Docker : project builds

Difficulty with docker builds is to understand when mounted volumes are available. # strategies : a) wrap a bash script around the docker runs & do commands via « docker exec » b) use COPY/ADD commands to inject context into the image … Continuer la lecture

Publié dans docker | Laisser un commentaire

3-11) Orchestrating services : manual way !

# ! you can actually create networks of containers without any docker-compose.yml file ! docker run –net –net-alias [] []

Publié dans docker | Laisser un commentaire

3-2) Networks

4 available network drivers : docker run –net [] – bridge (default) has its own virtual eth0 layer connected to a virtual docker0 switch layer – null ! no connection whatsoever ! – host takes on ALL network config of … Continuer la lecture

Publié dans docker | Laisser un commentaire

2-2) Docker introspection

# docker logs # docker inspect One prop : docker inspect –format « {{ prop.prop }} » # Discover reachable ports : docker port Ex. : tell me what port on the Host machine is mapped to port 80 on the container … Continuer la lecture

Publié dans docker | Laisser un commentaire

2-1) Dockerfile howtos

# independency of layers ! Base principle : each command within a Dockerfile (as in an image) is an INDEPENDENT LAYER ! This implies that each LAYER has its own environment. ! Example : CMD cd /tmp COPY ./* . … Continuer la lecture

Publié dans docker | Laisser un commentaire

2-4) manual building of images

A container can be turned into an image ! (although, the advised process is via Dockerfile) docker run -it – modify the container (install pkg, etc.) docker commit => yes, you’ve got your img 😉

Publié dans docker | Laisser un commentaire

docker internals

# docker-engine Docker-engine works via rest api over socket connections. (on Linux : Unix socket / on Windows : pipenet ? or tcp ?) # Localizations : ## On Windows 10 Infos glanées sur un forum docker : – Les … Continuer la lecture

Publié dans docker, Non classé | Laisser un commentaire

2-3) Publication

To have one’s images available online, you can push images to docker repositories. Official Docker repo comes built in obviously : https://cloud.docker.com/ docker tag username/repository:tag docker push username/repository:tag

Publié dans docker, Non classé | Laisser un commentaire

4) Swarms (swarm cmds)

Swarm is a group of machines (nodes) running docker and joined in a cluster. ! docker-machine cmds : set of tool to ease up the management of virtual/physical servers. Machines are most often virtual (virtual box most often). « d-m create … Continuer la lecture

Publié dans official docker tuto | Laisser un commentaire

3) Services (docker-compose.yml + stack cmds)

Services are containers in production Application = group of services # creation : 1 file : docker-compose.yml Within the file, the ‘image’ index defines the image to set up. Syntax : [/]repository[:tag] stack deploy -c docker-compose.yml // (after initializing the … Continuer la lecture

Publié dans official docker tuto | Laisser un commentaire