How to Install TYPO3 Docker & DDEV

Category : General , By : Sanjay Chauhan

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

To keep improving, Do you have feedback and suggestions? Or, Are you facing any issues to implement above TYPO3 tutorial? Feel free to write your comment at below comment box; I'll happy to help you :)

Post Comment

Your email address will not be published. Required fields are marked *

×

Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

Google Captcha Is Required!

Be the First to Comment

Stay up to date with our recent TYPO3 Blogs, news, & updates