Docker

Commands

Install Docker

sudo apt install docker.io

Verify

sudo docker run hello-world

Restart policy

Dockerfile instructions

Docker-Compose

Filestructure

- docker-compose.yml
	- instructions to orchestrate the containers
- folders for each container
	- The files needed for that container
	- ...
	- Dockerfile
		- Describes how this container works

Commands

build

docker-compose build

run

docker-compose up

Config

version: '3'

services:
  server:
    build: server/
    command: python ./server.py
    ports:
      - 1234:1234
  client:
    build: client/
    command: python ./client.py
    network_mode: host
    depends_on:
      - server

References