base image for symfony 7 (also maybe lower versions) using php and apache
115
This image is WIP but still working fine for me to use it has my main development environment. If you have any feedback or concerns reach to me on https://github.com/Kodoyosa/docker-symfonyready-apache/discussions/1
The purpose of this image is to make a development (and production not far in the future) ready container without having to install anything outside of docker container to work on it (aka php, http server and other symfony requirements). Managing your environment will be made through the shell of your container instead of your host machine making it less painful to keep your local environment up-to-date and always meeting the requirements and optimizations.
To use this image with docker compose you can simply use this docker-compose.yml example:
services:
http:
image: kodoyosa/sfready-apache:8.3-dev
volumes:
- ./api:/app
ports:
- 8000:80
docker-compose up --build and when the container's running you can connect to the shell of your container (with something like docker exec -it {your container name} bash) and install symfony with command line
symfony new --api --no-git .
(you can adapt the command line but --no-git is still recommended if you prefer to manage git out of the container)
Once Symfony's ready you can reach http://localhost:8000/ from your host machine
To edit code from your host as dev environment don't forget to set necessary permission to the api folder created by the symfony new command. For example you can use (from your host/dev machine):
sudo chown -R $USER:$GROUP api
but var/ will need to be updated by the container so you can just use
sudo chmod -R 777 api
When you want to start working simply run your docker compose with docker compose up
Then we recommend having a terminal opened with your running container to have access to command line stuff (at least symfony cli and composer)
Manual edit from your favorite code editor (or ide) is the only thing you have to do from your host machine.
Content type
Image
Digest
sha256:6d4e9de78…
Size
237 MB
Last updated
about 2 years ago
docker pull kodoyosa/sfready-apache:8.3-dev