forked from lmenezes/cerebro-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (18 loc) · 794 Bytes
/
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
FROM openjdk:11-jre-slim as builder
ARG CEREBRO_VERSION=0.9.4
RUN apt-get update \
&& apt-get install -y wget \
&& mkdir -p /opt/cerebro/logs \
&& wget -qO- https://github.com/lmenezes/cerebro/releases/download/v${CEREBRO_VERSION}/cerebro-${CEREBRO_VERSION}.tgz \
| tar xzv --strip-components 1 -C /opt/cerebro \
&& sed -i '/<appender-ref ref="FILE"\/>/d' /opt/cerebro/conf/logback.xml
FROM openjdk:11-jre-slim
COPY --from=builder /opt/cerebro /opt/cerebro
RUN addgroup -gid 1000 cerebro \
&& adduser -q --system --no-create-home --disabled-login -gid 1000 -uid 1000 cerebro \
&& chown -R root:root /opt/cerebro \
&& chown -R cerebro:cerebro /opt/cerebro/logs \
&& chown cerebro:cerebro /opt/cerebro
WORKDIR /opt/cerebro
USER cerebro
ENTRYPOINT [ "/opt/cerebro/bin/cerebro" ]