Lab03 Docker - jwells24/Tech-Journal GitHub Wiki

Docker Lab

Terms

  • Netplan: A network config system used on ubuntu to establish config files for the network. In these config files, we set the ip address and subnet, dhcp, nameservers, and gateway.
  • Firewalld: We can install firewalld on ubuntu systems with the command sudo apt-get install firewalld. Once installed on the ubuntu server, this allows us to use the firewall-cmd commands we are familiar with and allow ports/services through the firewall.
  • apt: apt is the application that allows us to install things and pull things from the internet on ubuntu servers. This is used in place of the yum command on centos7 servers.

Lab Overview

  • To start this lab off, we first have to learn how to configure netplan on the ubuntu system. We need to create a config file, like this one: /etc/netplan/configfile.yaml. In this config file, we add in the fields the information we need such as addresses, gateway4, dhcp4, and nameservers. Make sure to not use any tabs and to follow indentation very precisely. We can use the command sudo netplan apply once we are finished to apply our netplan config file. Once we change the hostname and add a sudo user and make him a sudo using: sudo usermod -aG sudo username.

  • Once we are finished establishing connectivity, we follow a guide to intall docker. This involves installing the directories and getting the gpg key in order to access the downloads from docker. Once docker is installed, we run through various docker commands. Docker run is the command we use to run a box and establish an output from docker. We can also find out the ports docker is using by doing docker ps in order to connect to the box via an internet browser: http://docker01-jack:49153.