commit 7a721acde6f26621235c0d7d0be1c8703da18443 Author: Chris Kankiewicz Date: Mon Dec 21 12:50:57 2015 -0700 First commit diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f81412e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +build.sh +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..053dcde --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +FROM alpine:3.2 +MAINTAINER Chris Kankiewicz + +# Create Mumble directories +ENV MUMBLE_DIR /opt/mumble +ENV CONFIG_DIR /srv/mumble +ENV SCRIPTS_DIR /srv/scripts +RUN mkdir -pv ${MUMBLE_DIR} ${CONFIG_DIR} + +# Copy config file +COPY files/config.ini ${CONFIG_DIR}/config.ini + +# Copy SuperUser password update script +COPY files/update-pw ${SCRIPTS_DIR}/update-pw +RUN chmod +x ${SCRIPTS_DIR}/update-pw + +# Install dependencies +RUN apk add --update ca-certificates bzip2 jq tar wget \ + && rm -rf /var/cache/apk/* + +# Download and extract Mumble +RUN MUMBLE_VERSION=$(wget -qO- https://api.github.com/repos/mumble-voip/mumble/releases | jq -r '.[0].tag_name') \ + && wget -qO- https://github.com/mumble-voip/mumble/releases/download/${MUMBLE_VERSION}/murmur-static_x86-${MUMBLE_VERSION}.tar.bz2 \ + | tar -xjv --strip-components=1 -C ${MUMBLE_DIR} + +# Expose ports +EXPOSE 64738 64738/udp + +# Set volumes +VOLUME ${CONFIG_DIR} + +# Default command +CMD ${MUMBLE_DIR}/murmur.x86 -fg -ini ${CONFIG_DIR}/config.ini diff --git a/README.md b/README.md new file mode 100644 index 0000000..10a14d9 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +docker-mumble +============= + +Docker container for Mumble server. + + +### Running the container + +First create a data-only container to hold the persistent config data: + + docker run --name mumble-data phlak/mumble echo "Data-only container for Mumble server" + +Then run the Mumble server: + + docker run -d -p 64738:64738 -p 64738:64738/udp --volumes-from mumble-data --restart=always --name mumble-server phlak/mumble + + +##### Get/set the SuperUser password + +After starting your container, you can get the randomly generated SuperUser password with: + + docker logs mumble-server 2>&1 | grep "Password for 'SuperUser'" + +**--- OR ---** + +Manually set a new SuperUser password with: + + docker exec -it mumble-server /srv/scripts/update-pw + +**NOTE:** This can be run at any time to update the SuperUser password + + +##### Edit the config + +Once you have a running container, you can edit the config with: + + docker exec -it mumble-server vi /srv/mumble/config.ini + +After saving changes, restart your container with `docker restart mumble-server` + + +----- + +**Copyright (c) 2015 Chris Kankewicz ** + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..c090991 --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -o errexit + +# Set the image name +IMAGE_NAME="phlak/mumble" + +# Set script directory path +SCRIPT_DIR="$(dirname $(readlink -f ${0}))" + +# Build the image +docker build --force-rm --pull --tag ${IMAGE_NAME}:local ${SCRIPT_DIR} + +# Notify user of success +echo "Sucessfully created image: ${IMAGE_NAME}:local" diff --git a/files/config.ini b/files/config.ini new file mode 100644 index 0000000..223f488 --- /dev/null +++ b/files/config.ini @@ -0,0 +1,6 @@ +# Murmur configuration file. +# See https://wiki.mumble.info/wiki/Murmur.ini for more options + +# Path to database. If blank, will search for +# murmur.sqlite in default locations or create it if not found. +database=/srv/mumble/murmur.sqlite diff --git a/files/update-pw b/files/update-pw new file mode 100644 index 0000000..e612e74 --- /dev/null +++ b/files/update-pw @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +${MUMBLE_DIR}/murmur.x86 -ini ${CONFIG_DIR}/config.ini -readsupw