forked from gobackup/gobackup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
80 lines (72 loc) · 2.23 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM alpine:latest
ARG VERSION=latest
RUN apk add \
curl \
ca-certificates \
openssl \
postgresql-client \
mariadb-connector-c \
mysql-client \
mariadb-backup \
redis \
mongodb-tools \
sqlite \
# replace busybox utils
tar \
gzip \
pigz \
bzip2 \
coreutils \
# there is no pbzip2 yet
lzip \
xz-dev \
lzop \
xz \
# pixz is in edge atm
zstd \
# microsoft sql dependencies \
libstdc++ \
gcompat \
icu \
# support change timezone
tzdata \
&& \
rm -rf /var/cache/apk/*
WORKDIR /tmp
RUN wget https://aka.ms/sqlpackage-linux && \
unzip sqlpackage-linux -d /opt/sqlpackage && \
rm sqlpackage-linux && \
chmod +x /opt/sqlpackage/sqlpackage
ENV PATH="${PATH}:/opt/sqlpackage"
# Install the influx CLI
ARG INFLUX_CLI_VERSION=2.7.5
RUN case "$(uname -m)" in \
x86_64) arch=amd64 ;; \
aarch64) arch=arm64 ;; \
*) echo 'Unsupported architecture' && exit 1 ;; \
esac && \
curl -fLO "https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}.tar.gz" \
-fLO "https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}.tar.gz.asc" && \
tar xzf "influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}.tar.gz" && \
cp influx /usr/local/bin/influx && \
rm -rf "influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}" \
"influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}.tar.gz" \
"influxdb2-client-${INFLUX_CLI_VERSION}-linux-${arch}.tar.gz.asc" \
"influx" && \
influx version
# Install the etcdctl
ARG ETCD_VER="v3.5.11"
RUN case "$(uname -m)" in \
x86_64) arch=amd64 ;; \
aarch64) arch=arm64 ;; \
*) echo 'Unsupported architecture' && exit 1 ;; \
esac && \
curl -fLO https://github.com/etcd-io/etcd/releases/download/${ETCD_VER}/etcd-${ETCD_VER}-linux-${arch}.tar.gz && \
tar xzf "etcd-${ETCD_VER}-linux-${arch}.tar.gz" && \
cp etcd-${ETCD_VER}-linux-${arch}/etcdctl /usr/local/bin/etcdctl && \
rm -rf "etcd-${ETCD_VER}-linux-${arch}/etcdctl" \
"etcd-${ETCD_VER}-linux-${arch}.tar.gz" && \
etcdctl version
ADD install /install
RUN /install ${VERSION} && rm /install
CMD ["/usr/local/bin/gobackup", "run"]