Skip to main content
Docker runs programs in isolated containers: inside sits the program with everything it needs, so you don’t have to match libraries and versions. A ready-made image starts with one or two commands, and a deleted container leaves no clutter in the system.

Installation

Connect over SSH as root: Connection.
  1. Install – the official script detects Ubuntu or Debian on its own and installs the latest Docker:
    If you need control over where the packages come from, install Docker from the official repository following docs.docker.com: it’s a longer route. Check the commands there too, the syntax changes from time to time.
  2. Check – Docker downloads and runs a test image, you should see Hello from Docker!:

Commands

  • docker run -d -p 8080:80 nginx – run a container:
    • -d – in the background.
    • -p 8080:80 – external port 8080 leads to port 80 inside the container.
    • nginx – the image name.
  • docker ps – running containers.
  • docker logs CONTAINER_NAME – container logs, take the name or ID from docker ps.
  • docker stop CONTAINER_NAME – stop a container.
  • docker rm CONTAINER_NAME – remove a container.
  • docker images – downloaded images.

Docker Compose

Several containers, say an app and a database, or a long startup command are easier to describe in a compose.yaml file and bring up with one command. Compose is built into Docker as a plugin: the command is docker compose with no hyphen, the old docker-compose utility is absent from new installations. Example compose.yaml, a web server on port 8080:
Put the file in its own folder and run the commands from there:
  • docker compose up -d – bring up everything from the file in the background.
  • docker compose down – stop and remove everything described in the file.

Ports

A port from -p or a ports block is reachable from the internet. Docker writes its own iptables rules that bypass ufw, so firewall rules won’t close such a port. Don’t publish ports that aren’t needed from outside. Publish a service that sits behind nginx on the same server only on 127.0.0.1: -p 127.0.0.1:8080:80. Protect control panels with a password. You set up the software yourself, Lumi handles the server and network. If the network or a port doesn’t work, message @lumisup_robot. Next: n8n, Your own LLM.