Table of Contents

Docker

Just some scrambled mess on how I sometimes have docker deployed in my environment.

Deploy in Ubu 18.04

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

Portainer

Portainer is love, Portainer is life.

docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 \
    --name=portainer --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:latest

Upgrading

docker pull portainer/portainer-ce:latest
docker stop portainer; docker rm portainer
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 \
    --name=portainer --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:latest

Dashboard

https://github.com/phntxx/dashboard

docker run -d --restart unless-stopped \
  -v /dockerMisc/dashboard:/app/data \
  -p 8081:8080 \
  --name dashboard \
  phntxx/dashboard

Smokeping

docker create \
  --name=smokeping \
  -e TZ=America/New_York \
  -p 8990:80 \
  -v /dockerMisc/smokePing/config:/config \
  -v /dockerMisc/smokePing/data:/data \
  --restart unless-stopped \
  linuxserver/smokeping

config/Targets

Whoogle

Whoogle Search

docker run -d --restart unless-stopped \
  -p 5000:5080 \
  --name Whoogle \
  benbusby/whoogle-search:latest

Caddy

docker run \
--publish 5000:5000 \
--restart=always --detach \
--name whoogle \
 benbusby/whoogle-search:latest

HasteBin

https://hub.docker.com/r/rlister/hastebin

docker create \
   --name=hastebin \
   --restart=always \
   -p 7777:7777 \
   -e STORAGE_TYPE=file \
   -v /dockerMisc/hastebin:/app/data \
   rlister/hastebin

OpenVPN AS

https://hub.docker.com/r/linuxserver/openvpn-as

docker create \
  --name=openvpn-as \
  --cap-add=NET_ADMIN \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/New_York \
  -e INTERFACE=enp3s0 \
  -p 943:943 \
  -p 9443:9443 \
  -p 1194:1194/udp \
  -v /dockerMisc/openvpn-as:/config \
  --restart unless-stopped \
  linuxserver/openvpn-as

Guacamole

oznu/guacamole has been deprecated. Follow this instead: https://www.linode.com/docs/guides/installing-apache-guacamole-through-docker/

First, deploy a base guac with no special extensions/whatever:

docker run \
  -p 8080:8080 \
  -v /dockerMisc/guac/config:/config \
  oznu/guacamole

Log in with the default credentials (guacadmin/guacadmin). If they don't take, restart the container. Create a new user, and disable or delete guacadmin. Stop the container.

Copy guacamole-auth-duo-1.0.0.jar from extensions-available to extensions.

Add the following to guacamole.properties:

# duo config
duo-api-hostname: api-fdafdasa.duosecurity.com
duo-integration-key: fdafdas
duo-secret-key: fdafdas
duo-application-key: fdafdsfds

Generate the duo-application-key with pwgen 40 (must be at least 40 chars!)

Edit the container's environment parameters to include EXTENSIONS=auth-duo (e.g. use duplicate/edit in portainer).

Make sure the proper hostname(s) are added to the “approved application hostnames” section for the app in Duo!

Wordpress

TBD

Pastebin

TBD

Plex?

I didn't think I would, yet here we are…

https://hub.docker.com/r/linuxserver/plex

Samba mount in fstab:

//jennay/media /smb cifs credentials=/home/john/.smbcreds,iocharset=utf8,vers=2.1,sec=ntlmssp 0 0

.smbcreds

username=derp
password=derp123

Do it! (Claim Key: https://www.plex.tv/claim/)

docker create \
  --name=Plex \
  --net=host \
  -e PUID=1000 \
  -e PGID=1000 \
  -e VERSION=docker \
  -e UMASK_SET=022 \
  -e PLEX_CLAIM=keyGoesHere \
  -v /dockerMisc/plex/config:/config \
  -v /smb/TV:/tv \
  -v /smb/Movies:/movies \
  --restart unless-stopped \
  linuxserver/plex

Dokuwiki

https://hub.docker.com/r/linuxserver/dokuwiki

Transmission

docker create \
  --name=Transmission \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/New_York \
  -p 9091:9091 \
  -p 51413:51413 \
  -p 51413:51413/udp \
  -v /dockerMisc/transmission/config:/config \
  -v /dockerMisc/transmission/downloads:/downloads \
  -v /dockerMisc/transmission/watch:/watch \
  --restart unless-stopped \
  linuxserver/transmission

In settings.json, set “rpc-host-whitelist-enabled”: false

Nextcloud

docker run -d \
  --name=nextcloud \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/New_York \
  -p 443:443 \
  -v /dockerMisc/nextcloud:/config \
  -v /mnt/data/nextcloud:/data \
  --restart unless-stopped \
  lscr.io/linuxserver/nextcloud

Time Machine / AFP

https://hub.docker.com/r/mbentley/timemachine

docker run -d --restart=always \
  --net=host \
  --name timemachine \
  -e CUSTOM_AFP_CONF="false" \
  -e CUSTOM_USER="false" \
  -e LOG_LEVEL="info" \
  -e MIMIC_MODEL="TimeCapsule6,106" \
  -e TM_USERNAME="timemachine" \
  -e TM_GROUPNAME="timemachine" \
  -e PASSWORD="timemachine" \
  -e SET_PERMISSIONS="false" \
  -e SHARE_NAME="TimeMachine" \
  -e VOLUME_SIZE_LIMIT="0" \
  -v /twotbraid/timemachine:/opt/timemachine \
  -v timemachine-netatalk:/var/netatalk \
  -v timemachine-logs:/var/log/supervisor \
  mbentley/timemachine

PORTS