This is mostly an exercise in creating a small alpine based docker image with bash, git an php included
It's an environment which can be used to contribute to https://github.com/shopware/devdocs/ if you don't want to install php locally or care about dependencies - although there aren't many.
How to use to contribute to shopware devdocs
This was tested with ubuntu linux 16.04, your mileage may vary
- Login to your github account
- Create a fork from https://github.com/shopware/devdocs/
- For simplicity, let's assume from now on your github username is swaguser
- Navigate to any directory on your computer using your terminal
- Create a new folder
docker run -it --rm -p 8000:8000 -v $(pwd)/devdocs:/home/dev 3stadt/swagdevdocs
- You will have an interactive shell
git clone https://github.com/swaguser/devdocs/Replace swaguser with your own github username
If you do not want sculpin server to run in foreground, omit the
./watch.sh command and
exit the container instead.
docker run -itd --rm -p 8000:8000 -v $(pwd)/devdocs:/home/dev -w=/home/dev/devdocs 3stadt/swagdevdocs ./watch.sh
-w that changes the working directory.
You'll have to kill the container via its ID to stop the server.
You might want to use the git stuff from outside the container. If so (I recommend it), make sure the folder you are mounting to
/home/dev has a subfolder with the checked out project, since composer will create a .composer file in the home dir. Another option would be to not mount to