Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
76 lines (62 loc) · 1.67 KB
/
Copy pathDockerfile
File metadata and controls
76 lines (62 loc) · 1.67 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
71
72
73
74
75
76
FROM s390x/alpine:3.20
LABEL org.opencontainers.image.authors="Evolved Binary Ltd <tech@evolvedbinary.com>"
LABEL name="Alpine 3 (s390x) RocksJava Build Environment" \
vendor="Evolved Binary Ltd"
# make: Allow N jobs at once; infinite jobs with no arg
ARG JOBS=1
# version of Apache Maven to install
ARG MAVEN_VERSION=3.9.12
# version of gflags to compile
ARG GFLAGS_VERSION=2.2.2
# update Alpine with latest versions
RUN \
apk update \
&& apk upgrade
# install CA certificates
RUN apk add ca-certificates
# install build tools
RUN apk add \
build-base \
coreutils \
file \
git \
perl \
automake \
autoconf \
cmake
# install tool dependencies for building RocksDB static library
RUN apk add \
curl \
bash \
wget \
tar \
openssl
# install RocksDB dependencies
RUN apk add \
snappy snappy-dev \
zlib zlib-dev \
bzip2 bzip2-dev \
lz4 lz4-dev \
zstd zstd-dev \
linux-headers
# install OpenJDK8
RUN apk add \
openjdk8 \
java-cacerts
# cleanup
RUN rm -rf /var/cache/apk/*
# Apache Maven, and gflags from source
RUN \
wget -qO- https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -zxvf- -C /opt \
&& wget -qO- https://github.com/gflags/gflags/archive/refs/tags/v$GFLAGS_VERSION.tar.gz | tar -zxvf- -C /tmp \
&& mkdir /tmp/gflags-$GFLAGS_VERSION/build \
&& cd /tmp/gflags-$GFLAGS_VERSION/build \
&& CMAKE_INSTALL_PREFIX=/usr cmake .. \
&& make -j $JOBS \
&& make install \
&& cd / \
&& rm -rf /tmp/gflags-$GFLAGS_VERSION
# puts javac in the PATH
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
ENV M2_HOME=/opt/apache-maven-$MAVEN_VERSION
ENV PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH