forked from soabase/exhibitor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (33 loc) · 1.41 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
# build gcsfuse
FROM golang:1.19-alpine as gcsfuse
ARG GCSFUSE_VERSION="0.41.9"
RUN apk add --no-cache git musl-dev \
&& go install -v github.com/googlecloudplatform/gcsfuse@v$GCSFUSE_VERSION
# build exhibitor
FROM maven:3.8-eclipse-temurin-11-alpine as builder
WORKDIR /exhibitor
COPY . .
RUN mvn -B -DskipTests=true install \
&& mvn -B -nsu -f exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/pom.xml package
FROM eclipse-temurin:11-jdk-alpine
LABEL maintainer "Bringg DevOps <[email protected]>"
ARG ZK_VERSION="3.6.3"
ENV ZK_RELEASE="http://archive.apache.org/dist/zookeeper/zookeeper-$ZK_VERSION/apache-zookeeper-$ZK_VERSION-bin.tar.gz"
RUN \
# Install required packages
apk add --no-cache bash fuse procps tini \
\
# Alpine doesn't have /opt dir
&& mkdir -p /opt \
\
# Install ZK
&& wget -qO- $ZK_RELEASE | tar -xvz -C /opt \
&& ln -s /opt/apache-zookeeper-$ZK_VERSION-bin /opt/zookeeper
# Add the optional web.xml for authentication and the wrapper script to setup configs
COPY docker-entrypoint.sh /usr/local/bin/
# Copy files from build containers
COPY --from=gcsfuse /go/bin/gcsfuse /usr/local/bin/
COPY --from=builder /exhibitor/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/target/exhibitor.jar /opt/exhibitor/exhibitor.jar
WORKDIR /opt/exhibitor
EXPOSE 2181 2888 3888 8181
ENTRYPOINT ["/sbin/tini", "-g", "--", "docker-entrypoint.sh"]