From 4c48eedb867dce09b10f4fdd13916c53a0a4b506 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Fri, 8 Jan 2016 09:20:18 -0700 Subject: [PATCH] Use static paths so we can use the exec form of CMD --- Dockerfile | 14 ++++++-------- files/config.ini | 2 +- files/supw | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1812067..3d8812c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,30 +5,28 @@ MAINTAINER Chris Kankiewicz ENV MUMBLE_VERSION 1.2.12 # Create Mumble directories -ENV MUMBLE_DIR /opt/mumble -ENV CONFIG_DIR /srv/mumble -RUN mkdir -pv ${MUMBLE_DIR} ${CONFIG_DIR} +RUN mkdir -pv /opt/mumble /etc/mumble # Copy config file -COPY files/config.ini ${CONFIG_DIR}/config.ini +COPY files/config.ini /etc/mumble/config.ini # Copy SuperUser password update script COPY files/supw /bin/supw RUN chmod +x /bin/supw -# Set the zipball URL +# Set the bzip archive URL ENV BZIP_URL https://github.com/mumble-voip/mumble/releases/download/${MUMBLE_VERSION}/murmur-static_x86-${MUMBLE_VERSION}.tar.bz2 # Install dependencies and fetch Mumble bzip archive RUN apk add --update ca-certificates bzip2 tar wget \ - && wget -qO- ${BZIP_URL} | tar -xjv --strip-components=1 -C ${MUMBLE_DIR} \ + && wget -qO- ${BZIP_URL} | tar -xjv --strip-components=1 -C /opt/mumble \ && apk del ca-certificates bzip2 tar wget && rm -rf /var/cache/apk/* # Expose ports EXPOSE 64738 64738/udp # Set volumes -VOLUME ${CONFIG_DIR} +VOLUME /etc/mumble # Default command -CMD ${MUMBLE_DIR}/murmur.x86 -fg -ini ${CONFIG_DIR}/config.ini +CMD ["/opt/mumble/murmur.x86", "-fg", "-ini", "/etc/mumble/config.ini"] diff --git a/files/config.ini b/files/config.ini index 223f488..5ea7536 100644 --- a/files/config.ini +++ b/files/config.ini @@ -3,4 +3,4 @@ # Path to database. If blank, will search for # murmur.sqlite in default locations or create it if not found. -database=/srv/mumble/murmur.sqlite +database=/etc/mumble/murmur.sqlite diff --git a/files/supw b/files/supw index e612e74..3dc2400 100644 --- a/files/supw +++ b/files/supw @@ -1,3 +1,3 @@ #!/usr/bin/env sh -${MUMBLE_DIR}/murmur.x86 -ini ${CONFIG_DIR}/config.ini -readsupw +/opt/mumble/murmur.x86/murmur.x86 -ini /etc/mumble/config.ini -readsupw