Browse Source

Use static version number

master
Chris Kankiewicz 9 years ago
parent
commit
0bf342643e
  1. 8
      Dockerfile
  2. 7
      build.sh

8
Dockerfile

@ -1,6 +1,9 @@
FROM alpine:3.2
MAINTAINER Chris Kankiewicz <Chris@ChrisKankiewicz.com>
# Define Mumble version
ENV MUMBLE_VERSION 1.2.12
# Create Mumble directories
ENV MUMBLE_DIR /opt/mumble
ENV CONFIG_DIR /srv/mumble
@ -15,12 +18,11 @@ 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 \
RUN apk add --update ca-certificates bzip2 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 \
RUN 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

7
build.sh

@ -7,8 +7,11 @@ IMAGE_NAME="phlak/mumble"
# Set script directory path
SCRIPT_DIR="$(dirname $(readlink -f ${0}))"
# Set image tag
TAG="$(grep 'ENV MUMBLE_VERSION' Dockerfile | awk '{print $3}')"
# Build the image
docker build --force-rm --pull --tag ${IMAGE_NAME}:local ${SCRIPT_DIR}
docker build --force-rm --pull --tag ${IMAGE_NAME}:${TAG} ${SCRIPT_DIR}
# Notify user of success
echo "Sucessfully created image: ${IMAGE_NAME}:local"
echo "Sucessfully created image: ${IMAGE_NAME}:${TAG}"
Loading…
Cancel
Save