Lab Docker Lab - Brandon-Duffy/SYS-265 GitHub Wiki

Beginning this lab i thought it would be incredibly difficult, as previous labs were regarding docker / our SYS255 final assessment.

However, things went quite smoothly up until deliverable 10 where I had the most trouble.

The main problem that held me back was syntax errors on my docker-compose.yml file, which took me about 30 minutes of staring at it to realize my "services.db" indentation for wordpress was incorrect which did not allow me to "docker compose up -d" which allows my server to be available.

Configuring Networking and Netplan on Ubuntu: This lab we had to use Netplan to configure a .yaml file with our network configs. This was straight forward, but the syntax needs to be 100% perfect or it will NOT work as I've found out. Of course, once we are done editing the config, we "sudo netplan apply" which is different from our CentOS VMs. After that, connectivity worked.

The process of adding a sudo user in CentOS and Ubuntu is quite similar. Under Ubuntu, the command is "sudo adduser ", then complete the user profile, and to add that new user to the sudo group, " sudo adduser sudo" and you're done. You can verify it worked by sending the command: "id "

Docker commands:

"docker run" starts a new docker container from an existing docker image. "docker compose" uses multiple docker containers as part of a single application. We used the .yml file to define the services and networks with WordPress and MySQL. "-d" used with 'docker run' and 'docker compose' that starts the container in detached mode where you can run the container in the background so you can continue to use the terminal. "-p" also used with run and compose, and maps the ports exposed by the container to the host system.

⚠️ **GitHub.com Fallback** ⚠️