Example PHP app dockerized
This repository shows example usage of Docker in your PHP app.
It solves common problems when working with Docker on dev/prod environments.
permission denied
issues thanks to creating user with same ID as yoursDockerfile’s located in .docker
and it’s subdirectories.
App is built and pushed through actions
to AWS ECR and then deployed to ECS (Fargate). See .github/workflows/build-and-deploy.yml
.
$ git clone git@github.com:initx/php-docker-skeleton.git \
&& cd php-docker-skeleton
$ docker-compose up -d
$ docker exec -it app_php bash
Tip: it is cool to create alias for entering app container in your .bashrc
or .zshrc
:
alias app_bash='docker exec -it app_php bash'
$ composer install