Date created: Wednesday, January 4, 2023 9:57:09 PM. Last modified: Monday, July 15, 2024 12:42:15 PM

Docker-Compose

Docker-Compose on ARM (ODROID-N2)

The iptables version used by ODROID-N2 is not compatability with docker-compose. Docker-compose is unable to create iptable rules when starting containers (even though Docker is able to). As a temporary fix, prevent docker-compose from creating iptable rules (this doesn't apply to containers which use host networking, only port forwarding) by adding "--iptables=false" to the ExecStart definition:

$ cat /usr/lib/systemd/system/docker.service | grep ExecStart
ExecStart=/usr/bin/dockerd --iptables=false -H fd:// --containerd=/run/containerd/containerd.sock

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

 

Interactive Shell

$ cat docker-compose.yaml 
services:
  shell:
    image: ubuntu:22.04
    entrypoint: bash

$ docker compose run --rm shell
[+] Creating 1/1
 ✔ Network tmp_default  Created                                                        0.1s 
root@55ceb6efda45:/# exit

 

Stats

There is no way to view container usage stats in "docker-compose" / "docker compose", instead use:

docker stats --no-stream

 

Syscl:

Set sysctl settings:

services:
app:
build: .
sysctls:
- net.ipv6.conf.all.disable_ipv6=1

 


Previous page: Docker
Next page: dropwatch