From 970b0d923fa6f15275225516eaaf114b807ef1a2 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 16 Mar 2020 11:36:00 -0500 Subject: [PATCH] Adapated to check sha256 --- Dockerfile | 43 +++++++++++++++++++++++-------------------- Makefile | 3 ++- README.md | 21 +++++---------------- pipeline.yml | 40 ++++++++++++++++++++++++++++++++++++++++ upload_pipeline.sh | 11 +++++++++++ 5 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 pipeline.yml create mode 100644 upload_pipeline.sh diff --git a/Dockerfile b/Dockerfile index 82d446d..7649b72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,42 @@ -FROM alpine:3.11 -LABEL maintainer="Chris Kankiewicz " +# Original maintainer https://hub.docker.com/r/phlak/mumble +# LABEL maintainer="Chris Kankiewicz " + +FROM alpine:3.11 AS downloader +LABEL maintainer="Drew Short " -# Define Mumble version ARG MUMBLE_VERSION=1.3.0 +ARG MUMBLE_SHA256=bda9dc3abe70e8dc820cc91aa33c4087b05001ab7995d039311b3396b7291609 +ARG BZIP_URL=https://github.com/mumble-voip/mumble/releases/download/${MUMBLE_VERSION}/murmur-static_x86-${MUMBLE_VERSION}.tar.bz2 + +WORKDIR /tmp -# Create Mumble directories RUN mkdir -pv /opt/mumble /etc/mumble +RUN apk add --update ca-certificates bzip2 tar curl +RUN curl -LSo murmur.tar.bz2 ${BZIP_URL} \ + && echo "${MUMBLE_SHA256} /tmp/murmur.tar.bz2" | sha256sum -c \ + && tar -xjf /tmp/murmur.tar.bz2 --strip-components=1 -C /opt/mumble + +FROM alpine:3.11 +LABEL maintainer="Drew Short " + +WORKDIR /opt/mumble -# Create non-root user +RUN mkdir -pv /opt/mumble /etc/mumble RUN adduser -DHs /sbin/nologin mumble -# Copy config file +COPY --from=downloader /opt/mumble /opt/mumble COPY files/config.ini /etc/mumble/config.ini - -# Copy SuperUser password update script COPY files/supw /usr/local/bin/supw -RUN chmod +x /usr/local/bin/supw -# Set the bzip archive URL -ARG BZIP_URL=https://github.com/mumble-voip/mumble/releases/download/${MUMBLE_VERSION}/murmur-static_x86-${MUMBLE_VERSION}.tar.bz2 - -# Install dependencies, fetch Mumble bzip archive and chown files -RUN apk add --update ca-certificates bzip2 tar tzdata wget \ - && wget -qO- ${BZIP_URL} | tar -xjv --strip-components=1 -C /opt/mumble \ - && apk del ca-certificates bzip2 tar wget && rm -rf /var/cache/apk/* \ +RUN chmod +x /usr/local/bin/supw +RUN apk add --update ca-certificates \ + && rm -rf /var/cache/apk/* \ && chown -R mumble:mumble /etc/mumble /opt/mumble -# Expose ports EXPOSE 64738 64738/udp -# Set running user USER mumble -# Set volumes VOLUME /etc/mumble -# Default command CMD ["/opt/mumble/murmur.x86", "-fg", "-ini", "/etc/mumble/config.ini"] diff --git a/Makefile b/Makefile index 722ef74..286c669 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ -IMAGE_NAME="phlak/mumble" +IMAGE_NAME="sothr/mumble" IMAGE_TAG="$$(grep 'ARG MUMBLE_VERSION' Dockerfile | awk -F = '{print $$2}')" build: + @echo "${IMAGE_TAG}" > tag @docker build --force-rm --pull --tag $(IMAGE_NAME):$(IMAGE_TAG) . purge: diff --git a/README.md b/README.md index 85e1461..17d8447 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,16 @@ docker-mumble =============

- Docker Mumble + Docker mumble

- - Join our - Become a Sponsor - Become a Patron - One-time Donation +

- Docker image for Mumble server. + Docker image for mumble server.

Running the Container @@ -28,7 +24,7 @@ volume. This is not required but is _highly_ recommended. After the data volume has been created run the server container with the named data volume: - docker run -d -p 64738:64738 -p 64738:64738/udp -v mumble-data:/etc/mumble --name mumble-server phlak/mumble + docker run -d -p 64738:64738 -p 64738:64738/udp -v mumble-data:/etc/mumble --name mumble-server sothr/mumble:latest #### Optional 'docker run' arguments @@ -68,14 +64,7 @@ After saving changes, restart your container: docker restart mumble-server -Troubleshooting ---------------- - -For general help and support join our [Slack Workspace](https://ln.phlak.net/join-slack). - -Please report bugs to the [GitHub Issue Tracker](https://github.com/PHLAK/docker-mumble/issues). - Copyright --------- -This project is licensed under the [MIT License](https://github.com/PHLAK/docker-mumble/blob/master/LICENSE). +This project is licensed under the [MIT License](https://gitlab.com/drewshort/docker-mumble/blob/master/LICENSE). diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..c10c1aa --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,40 @@ +--- +resources: + - name: git-resource + type: git + icon: git + source: + uri: https://git.nulloctet.com/docker/mumble.git + tag_filter: '*[0-9].*[0-9].*[0-9]*(-rc*(.*[0-9]))' + - name: git-resource-image-nexus + type: docker-image + icon: docker + source: + repository: ((nexus_docker_write.host))/sothr/mumble + username: ((nexus_docker_write.username)) + password: ((nexus_docker_write.password)) + - name: git-resource-image + type: docker-image + icon: docker + source: + repository: sothr/mumble + username: ((hub_docker_write.username)) + password: ((hub_docker_write.password)) + +jobs: + - name: build-image + plan: + - get: git-resource + trigger: true + - put: git-resource-image-nexus + params: + build: git-resource + tag_file: git-resource/.git/ref + tag_as_latest: true + get_params: {skip_download: true} + - put: git-resource-image + params: + build: git-resource + tag_file: git-resource/.git/ref + tag_as_latest: true + get_params: {skip_download: true} diff --git a/upload_pipeline.sh b/upload_pipeline.sh new file mode 100644 index 0000000..d1fc046 --- /dev/null +++ b/upload_pipeline.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +TEAM=docker +PIPELINE=mumble + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +pushd "${DIR}" + +fly -t ${TEAM} set-pipeline --pipeline ${PIPELINE} --config pipeline.yml + +popd