Update license year, Dockerfile, docker-run.sh and deps and add editorconfig

This commit is contained in:
Tulir Asokan
2019-01-12 15:54:04 +02:00
parent 1cccefd34c
commit 79bd35964f
31 changed files with 69 additions and 58 deletions

View File

@ -1,14 +1,12 @@
FROM golang:1-alpine AS builder
RUN apk add --no-cache git ca-certificates build-base
RUN wget -qO /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
RUN chmod +x /usr/local/bin/dep
RUN apk add --no-cache git ca-certificates build-base su-exec
COPY Gopkg.lock Gopkg.toml /go/src/maunium.net/go/mautrix-whatsapp/
WORKDIR /go/src/maunium.net/go/mautrix-whatsapp
RUN dep ensure -vendor-only
WORKDIR /build
COPY go.mod go.sum /build/
RUN go get
COPY . /go/src/maunium.net/go/mautrix-whatsapp
COPY . /build
RUN go build -o /usr/bin/mautrix-whatsapp
FROM alpine:latest
@ -16,11 +14,9 @@ FROM alpine:latest
ENV UID=1337 \
GID=1337
RUN apk add --no-cache \
su-exec
RUN apk add --no-cache su-exec ca-certificates
COPY --from=builder /usr/bin/mautrix-whatsapp /usr/bin/mautrix-whatsapp
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
COPY --from=builder /go/src/maunium.net/go/mautrix-whatsapp/example-config.yaml /opt/mautrix-whatsapp/example-config.yaml
COPY --from=builder /go/src/maunium.net/go/mautrix-whatsapp/docker-run.sh /docker-run.sh
VOLUME /data