-
Notifications
You must be signed in to change notification settings - Fork 83
/
Dockerfile
44 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
# Set the base image
FROM openjdk:8-jre-alpine
# Dockerfile author / maintainer
MAINTAINER SourceLab.org <[email protected]>
## Define what version of Kafka Webview to build the image using.
ENV WEBVIEW_VER="2.9.1" \
WEBVIEW_SHA1="11d3d2a31c1497683f8f8c19af73c649db2410d0" \
WEBVIEW_HOME="/app"
# Create app and data directories
RUN mkdir -p ${WEBVIEW_HOME} && \
mkdir -p ${WEBVIEW_HOME}/logs && \
mkdir -p ${WEBVIEW_HOME}/data && \
apk add --update bash curl && \
rm -rf /var/cache/apk/*
WORKDIR ${WEBVIEW_HOME}
# Download KafkaWebview Release from Github project
RUN curl -fSL -o /tmp/kafka-webview-ui-bin.zip https://github.com/SourceLabOrg/kafka-webview/releases/download/v${WEBVIEW_VER}/kafka-webview-ui-${WEBVIEW_VER}-bin.zip
# Verify SHA1 hash and extract.
RUN echo "${WEBVIEW_SHA1} /tmp/kafka-webview-ui-bin.zip" | sha1sum -c - && \
unzip -d ${WEBVIEW_HOME} /tmp/kafka-webview-ui-bin.zip && \
ls -l ${WEBVIEW_HOME} && \
ls -l ${WEBVIEW_HOME}/kafka-webview-ui-${WEBVIEW_VER}/* && \
mv ${WEBVIEW_HOME}/kafka-webview-ui-${WEBVIEW_VER}/* ${WEBVIEW_HOME} && \
rm -rf ${WEBVIEW_HOME}/kafka-webview-ui-${WEBVIEW_VER}/ && \
rm -rf ${WEBVIEW_HOME}/src && \
rm -f /tmp/kafka-webview-ui-bin.zip
# Create volume to persist data
VOLUME ${WEBVIEW_HOME}/data
# Expose WebUI Port
EXPOSE 8080
# Expose Acuator Port for health checks.
EXPOSE 9090
# What to run when the container starts
ENTRYPOINT [ "/app/start.sh" ]