This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
86 lines (73 loc) · 3.4 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
81
82
83
84
85
86
#
# Aerospike Server Enterprise Edition Dockerfile
#
# http://github.com/aerospike/aerospike-server-enterprise.docker
#
FROM debian:bullseye-20221114-slim
ENV AEROSPIKE_VERSION 6.1.0.4
ENV AEROSPIKE_SHA256 72406e745a8f03116e688d86ad3165741ee48cfad8e4d7cb637c9bdc4577ec47
ENV AS_TINI_SHA256 d1f6826dd70cdd88dde3d5a20d8ed248883a3bc2caba3071c8a3a9b0e0de5940
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install Aerospike Server and Tools
RUN \
export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
apt-utils \
2>&1 | grep -v "delaying package configuration" \
&& apt-get install -y --no-install-recommends \
binutils \
ca-certificates \
gettext-base \
wget \
xz-utils \
# Enterprise only dependencies
&& apt-get install -y --no-install-recommends \
libcurl4 \
libldap-2.4.2 \
&& wget https://github.com/aerospike/tini/releases/download/1.0.1/as-tini-static --progress=bar:force:noscroll -O /usr/bin/as-tini-static 2>&1 \
&& echo "$AS_TINI_SHA256 /usr/bin/as-tini-static" | sha256sum -c - \
&& chmod +x /usr/bin/as-tini-static \
&& wget "https://artifacts.aerospike.com/aerospike-server-enterprise/${AEROSPIKE_VERSION}/aerospike-server-enterprise-${AEROSPIKE_VERSION}-debian11.tgz" --progress=bar:force:noscroll -O aerospike-server.tgz 2>&1 \
&& echo "$AEROSPIKE_SHA256 aerospike-server.tgz" | sha256sum -c - \
&& mkdir -p aerospike/pkg \
&& tar xzf aerospike-server.tgz --strip-components=1 -C aerospike \
&& dpkg -i aerospike/aerospike-server-*.deb \
&& ar --output aerospike/pkg -x aerospike/aerospike-tools-*.deb \
&& tar xf aerospike/pkg/data.tar.xz -C aerospike/pkg/ \
&& rm -rf aerospike-server.tgz /var/lib/apt/lists/* \
&& dpkg -r apt-utils binutils ca-certificates wget xz-utils \
&& dpkg --purge apt-utils binutils ca-certificates wget xz-utils 2>&1 \
&& apt-get purge -y \
&& apt-get autoremove -y \
&& find aerospike/pkg/opt/aerospike/bin/ -user aerospike -group aerospike -exec chown root:root {} + \
&& mv aerospike/pkg/etc/aerospike/astools.conf /etc/aerospike \
# Since tools release 7.0.5, asadm has been moved from /opt/aerospike/bin/asadm to /opt/aerospike/bin/asadm/asadm (inside an asadm directory)
&& if [ -d 'aerospike/pkg/opt/aerospike/bin/asadm' ]; then \
mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/; \
ln -s /usr/lib/asadm/asadm /usr/bin/asadm; \
# Since tools release 7.1.1, asinfo has been moved from /opt/aerospike/bin/asinfo to /opt/aerospike/bin/asadm/asinfo (inside an asadm directory)
if [ -f /usr/lib/asadm/asinfo ]; then \
ln -s /usr/lib/asadm/asinfo /usr/bin/asinfo; \
fi \
fi \
&& rm -rf /opt/aerospike/bin \
&& rm -rf aerospike
# Add the Aerospike configuration specific to this dockerfile
COPY aerospike.template.conf /etc/aerospike/aerospike.template.conf
COPY entrypoint.sh /entrypoint.sh
# Mount the Aerospike data directory
# VOLUME ["/opt/aerospike/data"]
# Mount the Aerospike config directory
# VOLUME ["/etc/aerospike/"]
# Expose Aerospike ports
#
# 3000 – service port, for client connections
# 3001 – fabric port, for cluster communication
# 3002 – mesh port, for cluster heartbeat
#
EXPOSE 3000 3001 3002
# Tini init set to restart ASD on SIGUSR1 and terminate ASD on SIGTERM
ENTRYPOINT ["/usr/bin/as-tini-static", "-r", "SIGUSR1", "-t", "SIGTERM", "--", "/entrypoint.sh"]
# Execute the run script in foreground mode
CMD ["asd"]