File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed
Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM riscv64/alpine:3.20
2+
3+ LABEL org.opencontainers.image.authors="Evolved Binary Ltd <tech@evolvedbinary.com>"
4+
5+ LABEL name="Alpine 3 (riscv64) RocksJava Build Environment" \
6+ vendor="Evolved Binary Ltd"
7+
8+ # make: Allow N jobs at once; infinite jobs with no arg
9+ ARG JOBS=1
10+
11+ # version of gflags to compile
12+ ARG GFLAGS_VERSION=2.2.2
13+
14+ # update Alpine with latest versions
15+ RUN \
16+ apk update \
17+ && apk upgrade
18+
19+ # install CA certificates
20+ RUN apk add ca-certificates
21+
22+ # install build tools
23+ RUN apk add \
24+ build-base \
25+ coreutils \
26+ file \
27+ git \
28+ perl \
29+ automake \
30+ autoconf \
31+ cmake
32+
33+ # install tool dependencies for building RocksDB static library
34+ RUN apk add \
35+ curl \
36+ bash \
37+ wget \
38+ tar \
39+ openssl
40+
41+ # install RocksDB dependencies
42+ RUN apk add \
43+ snappy snappy-dev \
44+ zlib zlib-dev \
45+ bzip2 bzip2-dev \
46+ lz4 lz4-dev \
47+ zstd zstd-dev \
48+ linux-headers
49+
50+ # install OpenJDK21
51+ RUN apk add \
52+ openjdk21 \
53+ java-cacerts
54+
55+ # cleanup
56+ RUN rm -rf /var/cache/apk/*
57+
58+ # gflags from source
59+ RUN \
60+ wget -O gflags-$GFLAGS_VERSION.tar.gz https://github.com/gflags/gflags/archive/refs/tags/v$GFLAGS_VERSION.tar.gz \
61+ && tar zxvf gflags-$GFLAGS_VERSION.tar.gz \
62+ && mkdir gflags-$GFLAGS_VERSION/build \
63+ && cd gflags-$GFLAGS_VERSION/build \
64+ && CMAKE_INSTALL_PREFIX=/usr cmake .. \
65+ && make -j $JOBS \
66+ && make install \
67+ && cd / \
68+ && rm -rf gflags-$GFLAGS_VERSION*
69+
70+ # puts javac in the PATH
71+ ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk
72+ ENV PATH=/usr/lib/jvm/java-21-openjdk/bin:$PATH
You can’t perform that action at this time.
0 commit comments