Builds on top of the PHP7 Apache image, installing the required dependencies for running SilverStripe on Docker.
Use docker pull soulwolf/ss4:[tag] to pull this image onto your machine.
This image should be spun up via docker-compose & the doco utility. A service
definition might look like:
web:
image: soulwolf/ss4:latest
user: ${SW_UID}:${SW_GID}
sysctls:
- net.ipv4.ip_unprivileged_port_start=0
environment:
- DOCKER_ENV=live
- SS_ENVIRONMENT_TYPE=dev
- PACKAGIST_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- VIRTUAL_HOST=local.ss4.com
- ...
volumes:
- /etc/passwd:/etc/passwd:ro
- type: bind
source: ../web
target: /var/www/html
This image is able to run as an arbitrary user, and should be used this way to avoid permissions issue when it creates files in the web directory.
The PACKAGIST_TOKEN variable is required explicitly by this image. You'll also
need to add whatever variables are required by you SilverStripe installation to
this section.
Bind-mounting /etc/passwd is recommended to prevent the I have no name!
message when running commands via bash within the container. For other
bind-mounts, use the long form (as shown for ./web) as it prevents permission
issues on the host filesystem.
Composer is installed on this image, and can be used without starting the full container via:
doco run web composer
A convenience script for running sake dev/build "flush=1" is included in this
image, run it with:
doco run web build
Content type
Image
Digest
Size
209.7 MB
Last updated
about 6 years ago
docker pull soulwolf/ss4