-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
48 lines (34 loc) · 1.44 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
FROM maven:3-eclipse-temurin-17 as build-env
RUN apt-get update \
&& apt-get install -y libsnappy-dev \
&& apt-get install -y build-essential \
&& rm -rf /var/lib/apt/lists/*
# add rocksdb tools
# see outbackcdx pom.xml for rocksdb version (rocksdbjni) and
# check branches with https://github.com/facebook/rocksdb
RUN cd /tmp && \
git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
git checkout v8.1.1 && \
DEBUG_LEVEL=0 CXXFLAGS='-Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=class-memaccess' make tools && \
cp /tmp/rocksdb/ldb /usr/bin/ && \
cp /tmp/rocksdb/sst_dump /usr/bin/
WORKDIR /build
COPY pom.xml /build/pom.xml
RUN mvn -B -f /build/pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve-plugins dependency:go-offline
COPY src /build/src
COPY docs /build/docs
COPY resources /build/resources
RUN export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 && \
mvn -B -s /usr/share/maven/ref/settings-docker.xml -DskipTests package && \
mvn package
FROM eclipse-temurin:17
RUN apt-get update && apt-get install -y libsnappy-dev dumb-init \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build-env /build/target/outbackcdx-*.jar outbackcdx.jar
COPY --from=build-env /usr/bin/ldb /usr/bin
COPY --from=build-env /usr/bin/sst_dump /usr/bin
RUN mkdir /cdx-data
EXPOSE 8080
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD java -jar outbackcdx.jar -v -d /cdx-data -p 8080 -b 0.0.0.0