1-2) Git – undo

Ways to undo things


local reset
publicrevertcreates an commit that undoes another one
Publié dans git, Non classé | Laisser un commentaire

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 !

Publié dans docker | Laisser un commentaire

1) Docker images repositories

Because setting up containers usually starts from a base online image !

# php project

official images on hub.docker.com : https://hub.docker.com/_/php/
<= jessie = debian https://hub.docker.com/r/library/elasticsearch/tags/

Publié dans Non classé | Laisser un commentaire

virtual box

3 types of network :
– host-only : not visible from outside world
should have one NAT network
Activation :
1) create a host-only interface
2) connect to host-only network

– bridge networking

– internal networking

Publié dans Non classé | Laisser un commentaire

outils de gestion de projet web

Excellente liste d’outils :

Publié dans gestion de projet web, outils | 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 host machine !!!

– container
uses the network config of another container !

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 :
docker port 80

Publié dans docker | Laisser un commentaire

3-1) Orchestrating services

! Important : naming with meaningful names !

docker run –name

To use a already in-use name, without actually removing the old container, :
docker rename

Publié dans Non classé | 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 ./* . # <= copy into img's root (not /tmp !) If you do need to have several cmds executed, solutions are : - launch a script containing several instructions - chain on same line : CMD cd /tmp && copy ./* . - special cmds allow to bypass this limit : * WORKDIR * ENV (can also be set via RUN cmd line : -e )

Indicates which folder within a container are writable (in case the container has been launched in read-only mode)


Publié dans docker | Laisser un commentaire