Classic TYPO3 demo installation using Docker Compose

This guide shows how to run the same TYPO3 demo environment from the Classic TYPO3 demo installation using Docker only using Docker Compose.

Instead of running each container manually with docker run, we define the entire setup in a single docker-compose.yml file. This makes it easier to start, stop, and manage services as a group.

How to run TYPO3 with Docker Compose

Create a project directory

mkdir compose_demo_typo3
cd compose_demo_typo3
mkdir -p fileadmin typo3conf typo3temp

# Linux/WSL only (fix permissions during development)
# chmod -R 777 fileadmin typo3conf typo3temp
# sudo chown -R 33:33 fileadmin typo3conf typo3temp
Copied!

Create the docker-compose.yml file

docker-compose.yml
services:
  db:
    image: mariadb:10.6
    container_name: compose-demo-typo3db
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: db
      MYSQL_USER: db
      MYSQL_PASSWORD: db
    volumes:
      - db_data:/var/lib/mysql

  web:
    image: martinhelmich/typo3:latest
    container_name: compose-demo-typo3
    # Using linux? Uncomment the line below and use CURRENT_UID=$(id -u):$(id -g) docker-compose up to run
    # user: ${CURRENT_UID}
    ports:
      - "8081:80"
    depends_on:
      - db
    volumes:
      - ./fileadmin:/var/www/html/fileadmin
      - ./typo3conf:/var/www/html/typo3conf
      - ./typo3temp:/var/www/html/typo3temp

volumes:
  db_data:
Copied!

Start the environment

docker compose up -d
Copied!

Open TYPO3 in your browser

Visit:

http://localhost:8081
Copied!

Use these installer settings:

  • Database host: db
  • Username: db
  • Password: db
  • Database name: db

Stop and clean up

To stop all containers:

docker compose down
Copied!

To also remove volumes (e.g. the database):

docker compose down --volumes
Copied!