Docker allows you to run the exact same environment on different machines, thus preventing bugs related to using different operating systems (e.g., Windows, macOS, GNU/Linux), different packages versions (e.g., Apache HTTP Server, PHP, MariaDB, ...), and therefore different environments (e.g., development, staging, production). Less time dealing with environment issues = more time developing awesome features!
This guide assumes that you are comfortable with developer tools like
git. If you are not, and you are only looking for testing Tiki, you can access our online Tiki demos here: https://tiki.org/Demo If you are a developer but are not comfortable with those tools, you can have a look at the Resources part first.
Fork Tiki ( https://gitlab.com/tikiwiki/tiki ) and clone your fork. Tiki is a big repository, so you can decide to clone only the latest history (--depth=1) or only the specific branch you need (--single-branch).
Go into the repository you've just cloned and check out the Tiki version you want to work with:e.g.:
git checkout 20.x
In that same directory, clone tiki-docker:
git clone firstname.lastname@example.org:tikiwiki/tiki-docker.git laradock
P.S.: you don't have to call that directory
laradock, but default sensible settings are using this name. If you want to use your own name, you'll have to edit a few files (-+ .env+-, and
tiki-docker comes with environments for the different versions of Tiki. It will then use the correct PHP, mariadb, elasticsearch, etc... versions.
In your Tiki source, enter the tiki-docker source:
then check out your environment:
git checkout tiki-20.x
tiki-docker works out of the box, but you can set up your own variables, stored in the included
.env file. You may want to edit for example the apache2/nginx http host port, mysql/mariadb database name and credentials, although it is not necessary.
You are encouraged to change the
DATA_PATH_HOST variable to a unique project name. This is the place where your data will be stored (mysql/mariadb, elasticsearch, etc...) so that even if your containers are removed, your development data is not. If you use the same
DATA_PATH_HOST for different projects, the projects will overwrite each other's data.
In your tiki-docker source, you can now start your environment with the services of your choices:
docker-compose up -d apache2 mariadb elasticsearch maildev phpmyadmin adminer workspace
You can now access Tiki at http://localhost:PORTNUMBER. The PORTNUMBER will depend of the http host port variable configured in the
To access your workspace and run composer commands, tiki commands, etc..., in your tiki-docker source, run:
docker-compose exec workspace bash
When you finished developing, you can stop your containers. In your tiki-docker source, run:
Rather than typing every time
docker-compose up -d apache2 mariadb..., you might want to create aliases, like for example
devup. Same for stopping your containers:
devdown, or going into your workspace:
- Docker documentation and installation: https://docs.docker.com/
- Git: https://git-scm.com/
- Laradock: https://laradock.io/
- dotenv files: dotenv google search
- Xdebug: https://xdebug.org/
Please report on the tiki-docker repo: https://gitlab.com/tikiwiki/tiki-docker
Related: Kubernetes and AppImage
Everything I know on the topic of getting a working Tiki12 on docker is reported here: https://tiki.org/Tiki-deployement---Experiment-with-appsdeck
See this commit for all the info: https://gitlab.com/synergiq/tiki/commit/050df06191d4652d49faf5f85420890740992862
The link to the branch (from master) is https://gitlab.com/synergiq/tiki/tree/docker