From 89a19acd5aa97d5b038b99567b6ded7bef13ccf6 Mon Sep 17 00:00:00 2001 From: Grim Kriegor Date: Wed, 30 Jan 2019 02:00:49 +0000 Subject: [PATCH 1/3] Docker: add initial support --- Dockerfile | 23 +++++++++++++++++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d594444 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.9 as builder + +COPY . /go/src/mumble.info/grumble + +WORKDIR /go/src/mumble.info/grumble + +RUN go get -v -t ./... \ + && go build mumble.info/grumble/cmd/grumble \ + && go test -v ./... + +FROM golang:1.9 + +COPY --from=builder /go/bin /go/bin + +ENV DATADIR /data + +RUN mkdir /data + +WORKDIR /data + +VOLUME /data + +ENTRYPOINT [ "/go/bin/grumble", "--datadir", "/data", "--log", "/data/grumble.log" ] diff --git a/README.md b/README.md index 5d9e93c..2c5c982 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,36 @@ It is architected this way because it allowed me to write a pure-Go program with The current thinking is that if registered users are taking up too much of your memory, you should use an external authenticator. But that code isn't written yet. The concept would be equivalent to Murmur's authenticator API via RPC. But a Grumble authenticator would probably be set up more akin to a webhook -- so just a URL in the config file. Then there's the API problem. You can't currently remote control Grumble. Which can make it hard to use in production. I imagine Grumble will grow an API that it makes available via HTTP. Murmur's API is already quite stateless in many regards, so it shouldn't be too much of a stretch to put a RESTful API in Grumble to do the same job. + +Docker +============== + +## Getting the image + +### Building + + $ git clone https://github.com/mumble-voip/grumble.git + $ cd grumble/ + $ docker build -t mumble-voip/grumble . + +## Running + +### Docker CLI + + $ docker run \ + -v $HOME/.grumble:/data \ + -p 64738:64738 + -p 64738:64738/udp + mumble-voip/grumble + +### Compose + + version: '3' + services: + grumble: + image: mumble-voip/grumble + ports: + - 64738:64738 + - 64738:64738/udp + volumes: + - $HOME/.grumble:/data From 6877e5f5c918c6db4574a1e9af2b520889fc79d9 Mon Sep 17 00:00:00 2001 From: Grim Kriegor Date: Wed, 30 Jan 2019 02:20:54 +0000 Subject: [PATCH 2/3] Docker: fix README wording and newline escaping --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2c5c982..02771df 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,12 @@ Docker ## Running -### Docker CLI +### Command line $ docker run \ -v $HOME/.grumble:/data \ - -p 64738:64738 - -p 64738:64738/udp + -p 64738:64738 \ + -p 64738:64738/udp \ mumble-voip/grumble ### Compose From cb666fc9e0eb2fa7006827f8d0d8349922cc045b Mon Sep 17 00:00:00 2001 From: Grim Kriegor Date: Wed, 30 Jan 2019 02:28:55 +0000 Subject: [PATCH 3/3] Docker: add arm32v6 Dockerfile --- Dockerfile.arm32v6 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile.arm32v6 diff --git a/Dockerfile.arm32v6 b/Dockerfile.arm32v6 new file mode 100644 index 0000000..4867ab1 --- /dev/null +++ b/Dockerfile.arm32v6 @@ -0,0 +1,24 @@ +FROM arm32v6/golang:1.9-alpine as builder + +COPY . /go/src/mumble.info/grumble + +WORKDIR /go/src/mumble.info/grumble + +RUN apk add --no-cache git \ + && go get -v -t ./... \ + && go build mumble.info/grumble/cmd/grumble \ + && go test -v ./... + +FROM arm32v6/golang:1.9-alpine + +COPY --from=builder /go/bin /go/bin + +ENV DATADIR /data + +RUN mkdir /data + +WORKDIR /data + +VOLUME /data + +ENTRYPOINT [ "/go/bin/grumble", "--datadir", "/data", "--log", "/data/grumble.log" ]