-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (31 loc) · 980 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM golang:1.18-buster AS builder
# Configuration
ENV WALG_VERSION=2.0.1
ENV BROTLI_VERSION=1.0.9
# OS Packages
RUN apt-get update
RUN apt-get install -y build-essential cmake
# Brotli
WORKDIR /tmp
RUN wget -qO - https://github.com/google/brotli/archive/v${BROTLI_VERSION}.tar.gz | tar -xvzf '-'
WORKDIR /tmp/brotli-${BROTLI_VERSION}/out
RUN ../configure-cmake --disable-debug
RUN make
RUN make install
# WAL-G
WORKDIR $GOPATH/src
RUN git clone --depth 1 -b "v$WALG_VERSION" --single-branch https://github.com/wal-g/wal-g/
WORKDIR $GOPATH/src/wal-g/
RUN make install
RUN git submodule update --init
RUN make deps
RUN make pg_build
RUN make link_brotli
RUN install main/pg/wal-g /
RUN /wal-g --help
# Alpine container
FROM alpine:3.16.2
LABEL org.opencontainers.image.source=https://github.com/avestura/walg-docker
LABEL org.opencontainers.image.description="WAL-G bundled with Google's Brotli"
LABEL org.opencontainers.image.licenses=MIT
COPY --from=builder /wal-g /