Created
September 9, 2018 18:45
-
-
Save ryanjohnston/3c82930809af47d26a46f812470847d9 to your computer and use it in GitHub Desktop.
[Docker - Servers] Collection of scripts used to launch Docker server resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Free dynamic DNS service | |
# | |
# Requires the following global values to be defined elsewhere: | |
# | |
# DUCKDNS_TOKEN - Get this from your account page at DuckDNS. | |
# PGID - Your users GID | |
# PUID - Your users UID | |
# SUBDOMAINS - Get this from your account page at DuckDNS. | |
# TZ - Your timezone (ex. "America/Edmonton") | |
# | |
# Create container | |
# | |
duckdns_create() { | |
docker create \ | |
--name=duckdns \ | |
-e "PGID=$PGID" \ | |
-e "PUID=$PUID" \ | |
-e "SUBDOMAINS=$SUBDOMAINS" \ | |
-e "TOKEN=$DUCKDNS_TOKEN" \ | |
-e "TZ=$TZ" \ | |
linuxserver/duckdns | |
} | |
# | |
# Run container | |
# | |
duckdns() { | |
docker start duckdns | |
} | |
# | |
# View logs | |
# | |
duckdns_logs() { | |
docker logs -f duckdns | |
} | |
# | |
# Save container locally | |
# | |
duckdns_save() { | |
docker commit \ | |
--author "$AUTHOR" \ | |
duckdns \ | |
ryanjohnston/duckdns:latest | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment