-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.wal-g
More file actions
28 lines (23 loc) · 933 Bytes
/
Dockerfile.wal-g
File metadata and controls
28 lines (23 loc) · 933 Bytes
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
FROM golang:latest AS builder
ARG WALG_VERSION=v3.0.5
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update \
&& apt-get install -y --no-install-recommends cmake \
jq \
liblzo2-dev \
libsodium-dev
RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
git clone --depth 1 --branch ${WALG_VERSION} https://github.com/wal-g/wal-g \
&& cd wal-g \
&& export USE_BROTLI=1 \
&& export USE_LIBSODIUM=1 \
&& export USE_LZO=1 \
&& make deps \
&& make pg_build \
&& main/pg/wal-g --version
FROM alpine:latest
WORKDIR /
COPY --from=builder --chmod=755 /go/wal-g/main/pg/wal-g /usr/bin/wal-g
USER 65532:65532