Solution: Fixing Common Issues with Docker
Learn by doing your work alongside the solutions for fixing common issues with Docker.
Problem 1: Fixing formatting errors and package issues
Let’s take a look at the solution and review the code. There are five issues encountered while trying to launch the services for task 1. Here are the problems and how to resolve them.
Line 3: Docker complains of a parsing issue and we notice that there isn’t a colon in front of our
db
entry.
To resolve the error, we need to add a colon (:
) in front of thedb
entry.Line 6: Docker gives the
services.db.environment must be a mapping
error, and we observe that it’s a space issue.
We fix that by adding a space between the hyphen (-
) symbol and theMYSQL_ROOT_PASSWORD=admin
entry. ...