forked from aerospike/aerospike-server.docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (52 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
#
# Aerospike Server Dockerfile
#
# http://github.com/aerospike/aerospike-server.docker
#
FROM debian:buster-slim
ENV AEROSPIKE_VERSION 5.7.0.10
ENV AEROSPIKE_SHA256 6c17caabf03094c284c28406145447165ce7c40b954427879b8bd38d2824902b
# Install Aerospike Server and Tools
RUN \
apt-get update -y \
&& apt-get install -y iproute2 procps dumb-init wget python python3 python3-distutils lua5.2 gettext-base libcurl4-openssl-dev \
&& wget "https://www.aerospike.com/artifacts/aerospike-server-community/${AEROSPIKE_VERSION}/aerospike-server-community-${AEROSPIKE_VERSION}-debian10.tgz" -O aerospike-server.tgz \
&& echo "$AEROSPIKE_SHA256 *aerospike-server.tgz" | sha256sum -c - \
&& mkdir aerospike \
&& tar xzf aerospike-server.tgz --strip-components=1 -C aerospike \
&& dpkg -i aerospike/aerospike-server-*.deb \
&& dpkg -i aerospike/aerospike-tools-*.deb \
&& mkdir -p /var/log/aerospike/ \
&& mkdir -p /var/run/aerospike/ \
&& rm -rf aerospike-server.tgz aerospike /var/lib/apt/lists/* \
&& rm -rf /opt/aerospike/lib/java \
&& dpkg -r wget ca-certificates openssl xz-utils\
&& dpkg --purge wget ca-certificates openssl xz-utils\
&& apt-get purge -y \
&& apt autoremove -y \
# Remove symbolic links of aerospike tool binaries
# Move aerospike tool binaries to /usr/bin/
# Remove /opt/aerospike/bin
&& find /usr/bin/ -lname '/opt/aerospike/bin/*' -delete \
&& find /opt/aerospike/bin/ -user aerospike -group aerospike -exec chown root:root {} + \
&& mv /opt/aerospike/bin/* /usr/bin/ \
&& rm -rf /opt/aerospike/bin
# 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
# Runs as PID 1 /usr/bin/dumb-init -- /my/script --with --args"
# https://github.com/Yelp/dumb-init
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/entrypoint.sh"]
# Execute the run script in foreground mode
CMD ["asd"]