This is a Dockerfile of a Docker image to install and run SilverStripe CMS.
Note: This is for development purposes only; the root database user has no password.
If you don't have Docker on your machine, install it following the instructions on the Docker's Supported installation page.
To begin a new project:
mkdir new_project
cd new_project
docker run -v `pwd`:/var/www dyatlov/silverstripe new.sh
Then proceed with the following section.
- Create a Docker container. This step is supposed to be made only when you start your web-site for a first time. You can use different container names for different projects:
cd path/to/your/existing/silverstripe/project
docker create --name my_website -p 3000:80 -v `pwd`:/var/www dyatlov/silverstripe start.sh
- Start the Docker container:
docker start my_website
- Access your web-site. If you are running Docker on a Linux machine, simply open http://localhost:3000 in your borwser. If you are using Docker Toolbox (Mac/Windows machine), run the following command in your Docker terminal:
docker-machine ip default
It will show you an IP address of your Docker virtual machine. Past it to the browser and postfix it with the 3000 port: http://192.168.99.100:3000
Credentials for the CMS:
login: admin
password: password
- Stop the Docker container
docker stop my_website
- Save db to silverstripe_dump.sql
docker exec my_website save_db.sh
- Load db from silverstripe_dump.sql
docker exec my_website load_db.sh
This Docker image is heavily based on sminnee/docker-silverstripe-lamp.