Challenge: Fixing Common Issues with Docker
Challenge yourself to handle fixing common issues with Docker
Problem 1: Fixing formatting errors and package issues
We’ve been given a docker-compose.yml
file, which contains several formatting errors and a logstash.conf
file to process, forward, and log. Our task is to identify and correct the errors in the docker-compose.yml
file to ensure the file is formatted correctly and valid.
Here are the files:
The
docker-compose.yml
file:
Press + to interact
version: '3'services:dbimage: mysql:5.7environment:-MYSQL_ROOT_PASSWORD=admin- MYSQL_DATABASE=mydb- MYSQL_USER=user- MYSQL_PASSWORD=passredis:image:redis:latestvolumes:- ./data:/dataweb:image: nginx:latestports:-80:80logging:image: logstash:latestvolumes:- './logstash.conf:/etc/logstash.conf'- '/var/log:/logs'
...