forked from crazy-max/docker-jetbrains-license-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (38 loc) · 1.2 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
ARG JLS_VERSION=31550
ARG JLS_SHA256=85b65b31dfd04388cb20e2e984e315249fa02b9eb1e3352c6c1ffc2dd9065ea3
FROM crazymax/yasu:latest AS yasu
FROM alpine:3.15
ENV JLS_PATH="/opt/jetbrains-license-server" \
TZ="UTC" \
PUID="1000" \
PGID="1000"
ARG JLS_SHA256
RUN apk add --update --no-cache \
bash \
ca-certificates \
curl \
openjdk11-jre \
openssl \
shadow \
zip \
tzdata \
&& mkdir -p /data "$JLS_PATH" \
&& curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip" \
&& echo "$JLS_SHA256 /tmp/jls.zip" | sha256sum -c - | grep OK \
&& unzip "/tmp/jls.zip" -d "$JLS_PATH" \
&& rm -f "/tmp/jls.zip" \
&& chmod a+x "$JLS_PATH/bin/license-server.sh" \
&& ln -sf "$JLS_PATH/bin/license-server.sh" "/usr/local/bin/license-server" \
&& addgroup -g ${PGID} jls \
&& adduser -u ${PUID} -G jls -h /data -s /bin/bash -D jls \
&& chown -R jls. /data "$JLS_PATH" \
&& rm -rf /tmp/*
COPY --from=yasu / /
COPY entrypoint.sh /entrypoint.sh
EXPOSE 8000
WORKDIR /data
VOLUME [ "/data" ]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/usr/local/bin/license-server", "run" ]
HEALTHCHECK --interval=10s --timeout=5s \
CMD license-server status || exit 1