Update Docker image to Alpine 3.13

This commit is contained in:
Tulir Asokan 2021-02-05 19:39:27 +02:00
parent 79229ef19f
commit 1583ccd013
2 changed files with 5 additions and 20 deletions

View file

@ -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

View file

@ -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