Optimize layers

Coding style
This commit is contained in:
CrazyMax 2018-12-03 04:46:31 +01:00
parent 09dfb38e2c
commit 8883354cfc
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 9 additions and 10 deletions

View File

@ -7,7 +7,7 @@ ARG VERSION
LABEL maintainer="CrazyMax" \ LABEL maintainer="CrazyMax" \
org.label-schema.build-date=$BUILD_DATE \ org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="jetbrains-license-server" \ org.label-schema.name="jetbrains-license-server" \
org.label-schema.description="JetBrains License Server image based on Alpine Linux" \ org.label-schema.description="JetBrains License Server" \
org.label-schema.version=$VERSION \ org.label-schema.version=$VERSION \
org.label-schema.url="https://github.com/crazy-max/docker-jetbrains-license-server" \ org.label-schema.url="https://github.com/crazy-max/docker-jetbrains-license-server" \
org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-ref=$VCS_REF \
@ -15,16 +15,15 @@ LABEL maintainer="CrazyMax" \
org.label-schema.vendor="CrazyMax" \ org.label-schema.vendor="CrazyMax" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
RUN apk --update --no-cache add tzdata \
&& rm -rf /var/cache/apk/* /tmp/*
ENV JLS_PATH="/opt/jetbrains-license-server" \ ENV JLS_PATH="/opt/jetbrains-license-server" \
JLS_VERSION="17955" \ JLS_VERSION="17955" \
JLS_SHA256="998422a48b2d568e5baafd683f9f52b54e2274a0f526afd367a8b84e81b9ec70" JLS_SHA256="998422a48b2d568e5baafd683f9f52b54e2274a0f526afd367a8b84e81b9ec70"
ADD entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN apk --update --no-cache add -t build-dependencies \ RUN apk --update --no-cache add \
tzdata \
&& apk --update --no-cache add -t build-dependencies \
curl zip \ curl zip \
&& mkdir -p "$JLS_PATH" \ && mkdir -p "$JLS_PATH" \
&& curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip" \ && curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip" \

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
TZ=${TZ:-"UTC"} TZ=${TZ:-UTC}
JLS_PATH="/opt/jetbrains-license-server" JLS_PATH="/opt/jetbrains-license-server"
JLS_LISTEN_ADDRESS="0.0.0.0" JLS_LISTEN_ADDRESS="0.0.0.0"
JLS_PORT=80 JLS_PORT=80
JLS_CONTEXT=${JLS_CONTEXT:-"/"} JLS_CONTEXT=${JLS_CONTEXT:-/}
JLS_ACCESS_CONFIG=${JLS_ACCESS_CONFIG:-"/data/access-config.json"} JLS_ACCESS_CONFIG=${JLS_ACCESS_CONFIG:-/data/access-config.json}
# Timezone # Timezone
echo "Setting timezone to ${TZ}..." echo "Setting timezone to ${TZ}..."
@ -39,7 +39,7 @@ fi
# https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html # https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html
if [ ! -z "$JLS_SMTP_SERVER" -a ! -z "$JLS_STATS_RECIPIENTS" ] ; then if [ ! -z "$JLS_SMTP_SERVER" -a ! -z "$JLS_STATS_RECIPIENTS" ] ; then
JLS_SMTP_PORT=${JLS_SMTP_PORT:-"25"} JLS_SMTP_PORT=${JLS_SMTP_PORT:-25}
echo "Enabling User Reporting via SMTP at $JLS_SMTP_SERVER:$JLS_SMTP_PORT..." echo "Enabling User Reporting via SMTP at $JLS_SMTP_SERVER:$JLS_SMTP_PORT..."
license-server configure --smtp.server ${JLS_SMTP_SERVER} --smtp.server.port ${JLS_SMTP_PORT} license-server configure --smtp.server ${JLS_SMTP_SERVER} --smtp.server.port ${JLS_SMTP_PORT}