How to Install TYPO3 Docker & DDEV

Are you looking for step-by-step guide to install TYPO3 with Docker & DDEV? Here is the best working example to smoothly install and configure awesome DDEV for productive TYPO3 local development.

Note:
In this TYPO3 tutorial, we have considered Linux system, by little modification you can work other OS like Mac.

Step 1. (Optional) Uninstall MAMP/LAMP Enviornment

// Remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
// or
sudo apt-get purge apache2 apache2-utils apache2-bin apache2.2-common

// Remove MySQL
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

// Remove PHP
sudo apt-get purge 'php*'

Step 2. (Optional) Uninstall Existing Docker/DDEV

// Remove existing docker
dpkg -l | grep -i docker
sudo apt-get remove docker docker-engine docker-ce docker.io
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
sudo rm -rf /var/lib/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock

// Uninstall docker-compose
sudo rm /usr/local/bin/docker-compose

// Uninstall DDEV
ddev stop --remove-data --stop-ssh-agent and rm -r .ddev

Step 3. Install Docker & Docker Compose

// Install Docker CE (community edition)

sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

//curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

//sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt install apt-transport-https ca-certificates curl software-properties-common
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable"

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

// Check docker works well?
docker --version

// Install Docker-Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

// Take the test
docker-compose --version

Step 4. Resolve Access Permission Issue with Docker

// Solve permission issue, docker should run without non-root user

sudo groupadd docker
sudo usermod -aG docker $USER

// Restart your PC

// Test-drive Docker
docker run hello-world

// Configure Docker to start on boot
sudo systemctl enable docker

Step 5. Installation of DDEV

// Install DDEV
curl -L https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash

// Install mkcert
sudo apt install libnss3-tools
mkcert -install

// Check DDEV works well?
ddev

// Setup working directory
/home/nitsan/www/<project-name>

// Installation/Upgrade Script - Linux and macOS
curl -L https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash

Post a Comment

×
Captcha Code Can't read the image? Click here to refresh

    Got answer to the question you were looking for?