Cockpit CMS docker container

Cockpit CMS docker container

I am running Cockpit CMS for quite some time and I still love it for being an open source and easy to use headless CMS.

Unfortunately I could not find an actual docker image to run Cockpit CMS in a docker environment. Hence I decided to put this image together myself.

The final docker image you can find here: https://hub.docker.com/r/5v3n50mm3rf3ld/cockpit-cms

To run the docker image you can mount two volumes:

  • /var/www/cockpit/storage: To persist your Cockpit data locally
  • /var/www/cockpit/config: To persist your config data locally

To run the docker image you can use the following command:

docker run -d -p 80:80 -v <your_storage>:/var/www/cockpit/storage -v <your_conf_folder>:/var/www/cockpit/config 5v3n50mm3rf3ld/cockpit-cms:0.1

If you are running the docker container for the first time, you need to call the install routing by calling: http://127.0.0.1/install. This will create all the necessary folder structure to run Cockpit CMS.

The container right now only opens port 80, so you should put this behind a reverse proxy using TLS/SSL (port 443). One way of running Apache as a reverse proxy you can find here and I will share an example with an NGINX soon on my blog.