Go to file
Michael RICOIS 506c156b49 Update doc
2018-03-23 10:53:00 +01:00
additional Initial commit 2018-03-22 12:44:32 +01:00
compose Remove links 2018-03-22 18:04:35 +01:00
dockerfiles Update PHP container 2018-03-22 15:28:21 +01:00
docker-compose.yml Remove links 2018-03-22 18:04:35 +01:00
README.md Update doc 2018-03-23 10:53:00 +01:00

EnvDev Dockerfiles

Web Developement Environment (Apache, PHP, MariaDB, ...)

List

  • HTTPd
  • PHP-FPM
  • MariaDB
  • Redis
  • MailCatcher
  • MailDev
  • PHP-Cli

Docker Engine

Install

Mac: https://docs.docker.com/docker-for-mac/install/
Windows: https://docs.docker.com/docker-for-windows/install/
Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Docker compose

https://github.com/docker/compose/releases

Usage

Start with a docker-compose file (See sample).

We hope you have define a workspace path
Linux: /home/<user>/workspace
Windows: C:\<user>\worspace

Always go in <workspace>/devcontainer to execute docker-compose command.

Launch services (first time build)

docker-compose up -d

Delete service : docker-compose rm <container_name>
Prune all: docker-compose down

Start and stop

docker-compose start
docker-compose stop

Viewing log

docker-compose logs -f
docker-compose logs <container_name>

View running container

docker-compose ps

Update or Re-create base image

Specific container usage

PHP Cli

Work in your vhosts to execute some command in php

docker-compose exec -u fpm <container_name>

To avoid permissions problem

Update composer or an admin command

docker-compose exec <container_name>

Database

Database files are store in <workspace>/database.
Even if you delete your container date are preserved.

HTTPd

Additional

Ip Address

See all ip addresses in one command
docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)

ctop

Get ctop on github

sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop