Recently I have been playing around quite a lot with docker containers technology, not necessarily on Umbraco projects, but it is also a wonderful way to work with the .net CMS.
What I really enjoy with docker is how fast we can get environments ready, no matter their sizes or complexities, and how the infrastructures become volatile and simple to get up and down.
Anyway, this post is not about docker benefits and how to use it, but rather a simple use case for Umbraco demos.
At some point, I needed to show off, for customers, the caveat of the CMS and some of these wonderful packages, as the eCommerce Vendr from outfield.digital, or the wonderful Umbraco Marketing Suite extension.
I decided to build this on docker images.
Why docker for this Umbraco demos?
- The environment can be got up and got down in seconds, with just one line of code,
- A clean instance can be achieved, from scratch at any time.
- It can be used in several ways on different platforms without difficulties:
How is it?
From one side, I have built several docker images and hosted them in Docker Hub, There are public and free to use:
Umbraco with starterkit This is a basic Umbraco 8.9.1 instance with the default starter kit pre-install, using a CE SQL database
Umbraco with Marketing Suite and database Again an Umbraco 8.9.1 instance with the default starter kit, but also with the Marketing packages pre-install (you need to have a valid license to use it, see https://www.umarketingsuite.com/pricing/)
Docker compose files
From another side, I pushed in the repository https://github.com/agiraud/umbraco-docker-images some docker compose files that can be used to get the demos up.
How to use it?
In this post I will only go through the case of a local instance in your own computer, I will treat other alternative setups on Azure in a separate post.
1. Docker Desktop for windows
Obviously, this is the main pre-requirement and first step, you need Docker for windows installed in your computer https://docs.docker.com/docker-for-windows/install/. If you are new with docker, I invite you to have a look on the user manual https://docs.docker.com/docker-for-windows/
Make sure to switch your docker on windows containers:
2. Clone the repository:
As mentioned before, in this repository https://github.com/agiraud/umbraco-docker-images, you will find all the different docker compose files that you can use to get the demos up.
3. Run a demo
Open a Powershell console from where you cloned the repository and go to the demo directory you would like to run:
/samples/Starterkit: Umbraco starterkit
/samples/Vendr: Umbraco Vendr
/samples/MarketingSuite: Umbraco Marketingsuite
/samples/All: Run all the demo
Get the containers up with:
docker-compose up -d
The first time, the process takes longer because the docker images need to be downloaded, but then takes only a few seconds.
Once the container is up, you can browse the demos on the Url:
- Umbraco starterkit: http://umbracodemo.starterkit.local
- Umbraco Vendr: http://umbracodemo.vendr.local
- Umbraco Marketingsuite: http://umbracodemo.marketingsuite.local
To login to the back office use the credentials:
- Email: [email protected]
- Password: password1234
Note: for Marketingsuite, you must drop a valid licence into the folder
For any further information or configuration detail, you can check the Github repository readme https://github.com/agiraud/umbraco-docker-images, or post issues in case of troubleshooting.