Skip to content

Commit 157d2b8

Browse files
authored
Merge pull request #96 from crazy-max/alpine-3.21
Alpine Linux 3.21
2 parents 2de4b6c + 0aaa459 commit 157d2b8

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

Dockerfile

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@
22

33
ARG JLS_VERSION=39687
44
ARG JLS_SHA256=bcb5fa802993894c61bc4da96ffd823cbb90a3151ab4da57ae7cc8c4301d3eab
5-
ARG ALPINE_VERSION=3.19
5+
ARG ALPINE_VERSION=3.21
6+
7+
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS src
8+
RUN apk add --update --no-cache curl zip
9+
WORKDIR /src/jls
10+
ARG JLS_SHA256
11+
RUN <<EOT
12+
set -ex
13+
curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip"
14+
echo "$JLS_SHA256 /tmp/jls.zip" | sha256sum -c - | grep OK
15+
unzip "/tmp/jls.zip" -d .
16+
chmod a+x ./bin/license-server.sh
17+
EOT
618

719
FROM alpine:${ALPINE_VERSION}
20+
821
ENV JLS_PATH="/opt/jetbrains-license-server" \
922
TZ="UTC" \
1023
PUID="1000" \
1124
PGID="1000"
12-
ARG JLS_SHA256
25+
1326
RUN apk add --update --no-cache \
1427
bash \
1528
ca-certificates \
16-
curl \
1729
openjdk11-jre \
1830
openssl \
1931
shadow \
20-
zip \
2132
tzdata \
22-
&& mkdir -p /data "$JLS_PATH" \
23-
&& curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip" \
24-
&& echo "$JLS_SHA256 /tmp/jls.zip" | sha256sum -c - | grep OK \
25-
&& unzip "/tmp/jls.zip" -d "$JLS_PATH" \
26-
&& rm -f "/tmp/jls.zip" \
27-
&& chmod a+x "$JLS_PATH/bin/license-server.sh" \
28-
&& ln -sf "$JLS_PATH/bin/license-server.sh" "/usr/local/bin/license-server" \
33+
&& mkdir -p /data \
2934
&& addgroup -g ${PGID} jls \
30-
&& adduser -u ${PUID} -G jls -h /data -s /bin/bash -D jls \
31-
&& chown -R jls. /data "$JLS_PATH" \
32-
&& rm -rf /tmp/*
35+
&& adduser -u ${PUID} -G jls -h /data -s /bin/bash -D jls
3336

3437
COPY --from=crazymax/yasu:latest / /
38+
COPY --from=src /src/jls $JLS_PATH
39+
40+
RUN ln -sf "$JLS_PATH/bin/license-server.sh" "/usr/local/bin/license-server" \
41+
&& chown -R jls:jls /data "$JLS_PATH"
42+
3543
COPY entrypoint.sh /entrypoint.sh
3644

3745
EXPOSE 8000

0 commit comments

Comments
 (0)