Public | Automated Build

Last pushed: 5 months ago
Short Description
Don't have php installed, but want to contribute to shopware devdocs? There's an image for that...
Full Description

Why

This is mostly an exercise in creating a small alpine based docker image with bash, git an php included

What for

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 devdocs
  • Run 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
  • cd devdocs
  • ./init.sh
  • ./watch.sh

If you do not want sculpin server to run in foreground, omit the ./watch.sh command and exit the container instead.
Then, run:

docker run -itd --rm -p 8000:8000 -v $(pwd)/devdocs:/home/dev -w=/home/dev/devdocs 3stadt/swagdevdocs ./watch.sh

Notice the -w that changes the working directory.

You'll have to kill the container via its ID to stop the server.

Caveats

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 /home/dev directly.

Docker Pull Command
Owner
3stadt
Source Repository

Comments (0)