Docker & Debian - devinziegler/Devin-Tech-Journal GitHub Wiki

Ubuntu Network Configuration

Ubuntu is a Debian based distribution of Linux. Setting a static IP can be done though netplan. This will outline a basic netplan condfig for a static IP, as well as hostname configuration. I will also outline some basic user and group commands that I found were different from Centos.

The first command I will go over is changing the hostname. This can be done through the hostname ctl command which I think is also a command on Centos.

hostnamectl set-hostname <new_host_name>

To set a static IP we will need to edit the netplan config file here:

/etc/neplan/00-installer.yaml

Here is a resource to a good config that worked for me: linuxconfig.org I will also provide my example config in a snip below: tech_journal_example

Installing Docker On Ubuntu

This will give resources and general direction for installing docker in an Ubuntu terminal.

Useful command for docker

The docker help command is a good starting place

docker help

The docker ps command will list current containers

docke ps

The docker run command will run a command in a new container, it will also pull the image if not locally available. The command can also be used in junction with --help. This is useful for learning about the associated flags.

docker run <OPTIONS> IMAGE <COMMAND> <ARG...>

Docker & Wordpress

We used docker to setup a Wordpress web server. The resouce used can be found here: ndeloof - Github The setup is pretty straight forward. To check that Compose has been installed, run the following command:

docker compose version

To bring your own image into a container, use the following command

docker compose up -d

To pause an image use the pause command

docker compose pause

To bring down all containers, use the following command

docker compose down

To bring down containers without data loss, use the stop command

docker compose stop
⚠️ **GitHub.com Fallback** ⚠️