Skip to content

TYPO3 as docker

Philipp Zumstein edited this page Aug 16, 2018 · 6 revisions

Script

  1. Open the docker console (resp. a shell) and go to your repository directory
  2. The first time you need to run ./tools/start-docker.sh --new and afterwards simply ./tools/start-docker.sh
  3. This will create the two docker images (for the database and typo3 itself) and run a container of them. Check that both are running with docker ps
  4. Open http://localhost resp. docker-machine ip on windows in your browser and finish the configuration. The database is already connected between the two docker containers and named typo3-db.
  5. Open a bash in the running docker container with docker exec -ti <docker-container-id> bash
  6. Change the owner of the ext subdirectory, i.e. chown www-data:www-data typo3conf/ext
  7. Install the vhs extension in the typo3 backend.
  8. Activate the publication plugin in the typo3 backend. The current directory is mapped into the extension directory of typo3 and therefore the extension will automatically been found.

Configuration

You have to choose typo3-db as host and the user name and password previously configured in the database, i.e.

typo3-dbconnection

For testing purposes it might be the easiest create an empty page to start from:

typo3-install-5

Tips

  • After a while it is possible that you see the following error Error: Could not download file. Then you can stop the docker containers and restart the docker-machine with
docker-machine restart

and start the docker containers again.

  • Some errors can occur if docker has not enough space left. Then delete any old containers or images.
  • The plugin needs also the vhs plugin and you may need to install that plugin first.

Manual method (old)

See https://www.martin-helmich.de/de/blog/typo3-cms-docker.html

$ docker run -d --name typo3-db \
    -e MYSQL_ROOT_PASSWORD=yoursupersecretpassword \
    -e MYSQL_USER=typo3 \
    -e MYSQL_PASSWORD=yourothersupersecretpassword \
    -e MYSQL_DATABASE=typo3 \
  mariadb:latest \
    --character-set-server=utf8 \
    --collation-server=utf8_unicode_ci
$ docker run -d --name typo3-web \
    --link typo3-db:db \
    -p 80:80 \
  martinhelmich/typo3:7
Clone this wiki locally