Docker image to run symfony framework
The project must be in the /usr/local/src (with "public" folder) folder container folder and will be available on port :80 of the container
- stable
- latest
docker pull gerardojunior/symfony.environment:stable
to build the image you need install the docker engine only
*~ You can try building with different versions of software with docker args, for example: PHP_VERISON=7.2.5 ~*
git clone https://github.com/gerardo-junior/symfony.environment.git
cd symfony.environment
docker build . --tag gerardojunior/symfony.environment:stable
*~ you can install with xdebug with the argument: DEBUG=true ~*
# in your project folder
docker run -it --rm -v $(pwd):/usr/share/src -p 1234:80 gerardojunior/symfony.environment:stable [sh command or symfony console]
With docker-compose
Create the docker-compose.yml file in your project folder with:
# (...)
api:
image: gerardojunior/symfony.environment:stable
volumes:
- type: bind
source: ./
target: /usr/share/src
ports:
- 1234:80
# - 9000:9000 # xdebug port
# (...)
docker run -it --rm gerardojunior/symfony.environment:stable sh
# or with docker-compose
docker-compose run api sh
the default ide key is IDEA_XDEBUG but you can change with arg build XDEBUG_CONFIG_IDEKEY
the debug server will be available in :9000 by default but you can change with arg XDEBUG_CONFIG_PORT
This project is licensed under the MIT License - see the LICENSE file for details