Skip to content

Initializing with Docker


Short version: Initialize and start imperia CMS#

This is the short version of the tutorial that will work once you have set up Docker for imperia CMS on your server. If you haven't done so yet, first read the instruction Set up and start Docker for imperia CMS for the first time.

Step 1: Initialize imperia root directory#

imperia-docker init

At the end of the initialization dialog you will receive the superuser password. Make a note of it.

Step 2: Start Docker image#

imperia-docker serve

imperia CMS can then be called on port 2404. On the server itself under the URL: http://127.0.0.1:2404/imp/.

Set up and start Docker for imperia CMS for the first time#

In this step-by-step guide, you set up Docker for imperia CMS for the first time. At the end of this tutorial you will also learn how to create the alias imperia-docker so that you can use the short version next time.

Step 1: Install Docker#

See https://docs.docker.com/install/ for installation instructions for all operating systems. Among them are independent manuals for Ubuntu, CentOs, Windows and many more.

Step 2: Register to the imperia Docker registry#

Together with the delivery of the license key for imperia 11, imperia Support also provides you with personal access to our Docker registry, consisting of a user name and a password.

This is how you log in to your account on the imperia Docker registry via the terminal and Docker:

docker login --username BENUTZERNAME --password PASSWORT https://docker.imperia.cloud:16448

Step 3: Initialize imperia root directory#

This step is about creating a main directory for imperia CMS that contains all data that does not belong to the core of the software. That means user data, templates, generated files, etc. The default path in the native installation has always been /var/www/imperia/dev.

Navigate with the terminal to this directory or create an empty directory if it does not already exist.

Run this command in the terminal to initialize the directory for imperia CMS:

docker run --name imperia -p 2404:2404 --rm --env IMPERIA_HOST_PATH="$(pwd -P)"  --user `id -u` -it -v "$(pwd):/www" docker.imperia.cloud:16448/imperia:latest init

Note

The URL docker.imperia.cloud:16448/imperia:latest may vary slightly depending on your license. You will receive the exact URL together with the license documents from imperia Support.

At the end of the initialization dialog you will receive the superuser password. Make a note of it. Here is an example for the output of the dialog:

**************************************************************************
**************************************************************************
** The superuser password for this installation is:                     **
**                                                                      **
**    KA7zA1Ers                                                         **
**                                                                      **
** You can change it to your taste once you have logged in.             **
**************************************************************************
**************************************************************************

Step 4: Start Docker image#

To start the imperia system configured in this way, run the following command in the same directory:

docker run --name imperia -p 2404:2404 --rm --env IMPERIA_HOST_PATH="$(pwd -P)"  --user `id -u` -it -v "$(pwd):/www" docker.imperia.cloud:16448/imperia:latest serve

According to the docker call created above, the system is then available on port 2404.

Note

The URL docker.imperia.cloud:16448/imperia:latest may vary slightly depending on your license. You will receive the exact URL together with the license documents from imperia Support.

Optional: Create alias imperia-docker#

To avoid having to use the long docker command every time, it is advisable to create a so-called alias.

Then you can use the commands imperia-docker init and imperia-docker serve used in the Short version guide.

Add the following command to your alias file. On a standard Linux system, you can find this file under ~/.bash_profile or ~/.bashrc.

alias imperia-docker='docker run --name imperia -p 2404:2404 --rm --env IMPERIA_HOST_PATH="$(pwd -P)"  --user `id -u` -it -v "$(pwd):/www" docker.imperia.cloud:16448/imperia:latest'

How do you proceed from here?#

If imperia CMS is running in your docker container and can be accessed via the browser, you can now log on as a superuser and start administrating the system. Continue here:

Administration documentation

Would you like to run imperia CMS not only via Docker, but also migrate an existing installation to Docker? Continue here:

Migrating imperia CMS to Docker

The Docker image from our registry is not adequate for you and you want to extend it and build it yourself? Continue here:

Build your own Docker image