-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.Dockerfile
More file actions
70 lines (61 loc) · 3.21 KB
/
Copy pathdatabase.Dockerfile
File metadata and controls
70 lines (61 loc) · 3.21 KB
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
# =============================================================================
# Aerospike Database Node - Workshop VM
# =============================================================================
# This Dockerfile creates a VM-like container with:
# - Ubuntu 24.04 with systemd support (for systemctl commands)
# - Aerospike Server package (Community or Enterprise, not installed/running)
# - Pre-configured directories and permissions
#
# Build Arguments:
# AEROSPIKE_EDITION: "community" (default) or "enterprise"
#
# For Enterprise Edition:
# 1. Place your package in package/enterprise/
# 2. Build with: AEROSPIKE_EDITION=enterprise
# =============================================================================
FROM base-image
ARG TARGETPLATFORM
ARG AEROSPIKE_EDITION=community
ARG AEROSPIKE_VERSION=8.1.0.1
ARG TOOLS_VERSION=12.0.2
ENV AEROSPIKE_EDITION=${AEROSPIKE_EDITION}
# -----------------------------------------------------------------------------
# Install database-specific packages
# -----------------------------------------------------------------------------
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
libldap-common && \
apt-get autoremove -y --purge && \
rm -rf /var/lib/apt/lists/*
# Create required Aerospike directories
RUN mkdir -p /var/log/aerospike \
/var/run/aerospike \
/opt/aerospike/data \
/opt/aerospike/smd
# -----------------------------------------------------------------------------
# Download or copy Aerospike Server package
# -----------------------------------------------------------------------------
SHELL ["/bin/bash", "-c"]
# Copy enterprise packages if they exist (will be empty for community builds)
COPY package/ ${HOME}/package-pkg/
RUN if [[ "$TARGETPLATFORM" == *"arm64"* ]] || [[ "$(uname -m)" == "aarch64" ]]; then \
ARCH="aarch64"; \
else \
ARCH="x86_64"; \
fi && \
echo "Building for ${AEROSPIKE_EDITION^} edition ${AEROSPIKE_VERSION} (${ARCH})..." && \
if [[ -f ${HOME}/package-pkg/aerospike-server-${AEROSPIKE_EDITION}_${AEROSPIKE_VERSION}_tools-${TOOLS_VERSION}_ubuntu24.04_${ARCH}.tgz ]]; then \
echo "Using ${AEROSPIKE_EDITION^} Edition from local package..." && \
mv ${HOME}/package-pkg/aerospike-server-${AEROSPIKE_EDITION}_${AEROSPIKE_VERSION}_tools-${TOOLS_VERSION}_ubuntu24.04_${ARCH}.tgz ${HOME}/ 2>/dev/null || true; \
else \
echo "Downloading ${AEROSPIKE_EDITION^} Edition ${AEROSPIKE_VERSION} (${ARCH})..." && \
wget -q "https://download.aerospike.com/artifacts/aerospike-server-${AEROSPIKE_EDITION}/${AEROSPIKE_VERSION}/aerospike-server-${AEROSPIKE_EDITION}_${AEROSPIKE_VERSION}_tools-${TOOLS_VERSION}_ubuntu24.04_${ARCH}.tgz" \
-O ${HOME}/aerospike-server-${AEROSPIKE_EDITION}_${AEROSPIKE_VERSION}_tools-${TOOLS_VERSION}_ubuntu24.04_${ARCH}.tgz; \
fi && \
rm -rf ${HOME}/package-pkg
# -----------------------------------------------------------------------------
# Set permissions
# -----------------------------------------------------------------------------
RUN chown -R ${WORKSHOP_UID}:root /var/log/aerospike \
/var/run/aerospike \
/opt/aerospike