Mémo Docker par Mathieu JUERS Développeur symfony Aix en Provence

Installation sur Debian

# Ajout au fichier /etc/apt/source.list
deb https://get.docker.io/ubuntu docker main

sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

Commandes

# Lunch container
docker run -d -p 11480:80 -v $(pwd):/var/www -v $(pwd)/shared:/shared test/symfony
docker stop $(docker ps -a -q)


# Delete all container
docker rm $(docker ps -a -q)

# Delete all images
docker rmi $(docker images -a -q)

# Last container
docker ps -q -n 1

# List container with full id
docker ps --no-trunc

# Commit change container
docker commit {container_id} test/symfony

# Inspect an container
docker inspect {full_container_id}

# Build an container with Dockerfile
docker build -t test/symfony base_symfony2

Github


https://github.com/mathsunn/docker_base_symfony