Sign inSign up

naei/lempfony

By naei

Updated almost 10 years ago

Environment for developers, with Ubuntu 16.04, Nginx, MySQL, PHP 7.0, phpMyAdmin, Composer & Symfony

Image
0

422

naei/lempfony repository overview

docker-lempfony

Docker Build Docker Pulls

Set up a development environment in a single container.

Ubuntu 16.04 | Nginx | MySQL | PHP 7.0 | phpMyAdmin | Composer | Symfony

Get the image
...by pulling it from the Docker Hub Registry:
docker pull naei/lempfony
...by building it from the sources:

Clone the project, access it from your terminal, then build it:

docker build \
  --build-arg mysql_root_pwd=<custom_pwd> \
  -t naei/lempfony .

If --build-arg [...] is not set, MySQL credentials will be root:development.

Run the container
docker run -it --rm --name lempfony -p 80:80 \
  -v <workspace/conf/lempfony>:/etc/opt/lempfony/volume \
  -v <workspace/conf/nginx-sites>:/etc/nginx/sites-available \
  -v <workspace/log>:/var/log \
  -v <workspace/mysql>:/var/lib/mysql \
  -v <workspace/www>:/var/www \
  naei/lempfony:latest

For detached mode, replace the first line by:
docker run -dit --name lempfony -p 80:80 \

The data volumes are optionals and can be added or removed depending on the needs.
For detailled information about it, you can take a look at the example workspace.

Create a new Symfony app

From the container shell, you can quickly setup a functionnal new Symfony app:

symfony-create <app-name> [symfony-version]

Your project will be immediately accessible at <app-name>.dev .

Troubleshooting
➢ I don't know on which IP my container is running
docker inspect --format '{{ .NetworkSettings.IPAddress }}' lempfony
➢ The local domain name is not accessible from Firefox

You might need to add the local domain name into about:config > network.dns.localDomains

➢ Windows host: the Symfony project creation script crash after "Preparing project..."

The Symfony project creation process works with symlinks. By default on Windows, only an administrator can create symlink, so be sure that the Docker terminal is launched as an administrator.

➢ Windows host: the local domain names are accessible from inside the container but not from a web browser

Each domain name must be binded to the Docker container's IP in the C:\Windows\System32\drivers\etc\hosts file:

192.168.99.100 project.dev
192.168.99.100 otherproject.dev

Tag summary

Content type

Image

Digest

Size

237 MB

Last updated

almost 10 years ago

docker pull naei/lempfony