...

/

Challenge: Fixing Common Issues with Docker

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:
db
image: mysql:5.7
environment:
-MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=mydb
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
redis:
image:redis:latest
volumes:
- ./data:/data
web:
image: nginx:latest
ports:
-80:80
logging:
image: logstash:latest
volumes:
- './logstash.conf:/etc/logstash.conf'
- '/var/log:/logs'
...