burim:docker
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
docker docker-compose chear sheet
guides docker
- docker networking
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
- change overlay dirctory
https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169
CMD's
- get in to the docker container
docker exec -it <mycontainer> bash
asterisk inside 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
- You can run a container that restart always by:
$ docker run -dit --restart unless-stopped <image name OR image hash>
- If you want to change a running container's configs, you should update it by:
$ 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
sudo vi /etc/docker/daemon.json
{
"log-driver": "journald",
"log-opts": {
"tag": "{{.Name}}"
},
"bip": "172.26.0.1/16"
}
burim/docker.txt · Last modified: 2022/10/26 20:54 by burim
