After upgrading to Ubuntu 22.04 LTS, you might run into errors trying to start your Docker containers similar to “Error response from daemon: OCI runtime create failed: container with id exists: UUID UUID: unknown Error: failed to start containers: unknown“. Depending on how you installed Docker, you might need to add the repository and perform an update. If you’re on a version of docker less than 20, you’ll definitely run into issues.
How To Fix Docker OCI Runtime Create Failed on Ubuntu 22.04 LTS
Import docker repository GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add Docker repository (this command will add the Stable release and 64-bit):
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Now when you run sudo apt update && upgrade you should get the latest version of Docker installed.
Once you have the current version of Docker installed, you should be able to run your Docker Compose command and start or rebuild your containers.