From 1583ccd0130e372cbdf7f4873123439932129bee Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 5 Feb 2021 19:39:27 +0200 Subject: [PATCH] Update Docker image to Alpine 3.13 --- Dockerfile | 16 +++------------- Dockerfile.ci | 9 ++------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b4224e..419b792 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,4 @@ -FROM golang:1-alpine3.12 AS builder - -RUN echo $'\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/main\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories +FROM golang:1-alpine3.13 AS builder RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev @@ -11,17 +6,12 @@ COPY . /build WORKDIR /build RUN go build -o /usr/bin/mautrix-whatsapp -FROM alpine:3.12 - -RUN echo $'\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/main\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories +FROM alpine:3.13 ENV UID=1337 \ GID=1337 -RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq@edge curl +RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq curl COPY --from=builder /usr/bin/mautrix-whatsapp /usr/bin/mautrix-whatsapp COPY --from=builder /build/example-config.yaml /opt/mautrix-whatsapp/example-config.yaml diff --git a/Dockerfile.ci b/Dockerfile.ci index d5e016f..bddb8c2 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,14 +1,9 @@ -FROM alpine:3.12 - -RUN echo $'\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/main\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing\n\ -@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories +FROM alpine:3.13 ENV UID=1337 \ GID=1337 -RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq@edge +RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq ARG EXECUTABLE=./mautrix-whatsapp COPY $EXECUTABLE /usr/bin/mautrix-whatsapp