Table of Contents

container management

portainer/portainer-ce

plex sample

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: docker1

NFS share docker

https://blog.stefandroid.com/2021/03/03/mount-nfs-share-in-docker-compose.html

volumes:
  videos:
    driver_opts:
      type: "nfs"
      o: "addr=192.168.1.4,nfsvers=4"
      device: ":/path/to/video-dir"

docker static IP

https://www.cloudsavvyit.com/14508/how-to-assign-a-static-ip-to-a-docker-container/amp/

docker docker-compose chear sheet

https://dev-eole.ac-dijon.fr/doc/cheatsheets/docker.html

guides docker

https://www.aquasec.com/wiki/plugins/servlet/mobile?contentId=2852835#content/view/2852835

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04

* how to remove docker

https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169

CMD's

docker exec -it <mycontainer> bash

asterisk inside docker

http://areskibelaid.com/asterisk-on-docker/

ubuntu run as docker

docker run -itd --name ubuntu ubuntu:latest

checkmk

docker container run --rm -dit -p 8080:5000 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 --ulimit nofile=1024 -v /omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro checkmk/check-mk-raw:1.6.0-latest
To go without persistent storage, simply omit the -v /omd/sites 

check if docker is going to autostart

root@frubu01:/home/burim# docker inspect dba84e4d18ba | grep RestartPolicy -A 3
          "RestartPolicy": {
              "Name": "no",
              "MaximumRetryCount": 0

change to autostart

docker update --restart=always dba84e4d18ba
          },
root@frubu01:/home/burim# docker inspect ad7216f098c1 | grep RestartPolicy -A 3
          "RestartPolicy": {
              "Name": "always",
              "MaximumRetryCount": 0
$ docker run -dit --restart unless-stopped <image name OR image hash>
$ docker update --restart=<options> <container ID OR name>
$ docker update --restart unless-stopped redis

docker disable autostart

docker update --restart=no my-container

docker ip range change

https://support.getjoan.com/hc/en-us/articles/360008889859-How-to-change-the-Docker-default-subnet-IP-address

sudo vi /etc/docker/daemon.json


{
"log-driver": "journald",
"log-opts": {
"tag": "{{.Name}}"
},
"bip": "172.26.0.1/16"
}