30 Commits

Author SHA1 Message Date
CrazyMax
5743c7dc8a JetBrains License Server 21137 2019-10-24 18:45:07 +02:00
CrazyMax
f6aca1ead3 Update labels workflow 2019-10-24 18:41:57 +02:00
CrazyMax
8f4d76fb7f Final labels 2019-10-20 05:19:03 +02:00
CrazyMax
cf603f0736 Fix Docker labels 2019-10-20 05:18:58 +02:00
CrazyMax
13cec3d9a9 Add ghaction-github-labeler 2019-10-20 01:19:39 +02:00
CrazyMax
6359aa45f0 Optimize layers 2019-10-10 16:37:50 +02:00
CrazyMax
a8d867a41f Update CHANGELOG 2019-10-10 16:14:50 +02:00
CrazyMax
2d2c94dbcf Update README 2019-10-10 16:14:40 +02:00
CrazyMax
5fc3fa53b5 Switch to GitHub Actions
Stop publishing Docker image on Quay
2019-10-10 16:04:08 +02:00
CrazyMax
3471f7d26d Multi-platform Docker image
Run as non-root user
2019-10-10 15:58:56 +02:00
CrazyMax
3e9d114333 Set timezone through tzdata 2019-10-10 15:26:40 +02:00
CrazyMax
61de4e84a7 Update README 2019-10-10 15:20:39 +02:00
CrazyMax
d0f04e2bed Update README 2019-08-07 09:51:43 +02:00
CrazyMax
43f331f798 Add healthcheck 2019-08-04 09:26:54 +02:00
CrazyMax
1b7c1ccafa JetBrains License Server 20308 2019-07-30 14:56:03 +02:00
CrazyMax
744f335ca1 Update README 2019-07-29 06:32:48 +02:00
CrazyMax
ab88f3f93f Update README 2019-07-25 05:41:12 +02:00
CrazyMax
dd189e58da Update FUNDING 2019-07-24 13:12:16 +02:00
CrazyMax
af04242028 OpenJDK JRE 12
Alpine Linux 3.10
2019-07-22 20:38:02 +02:00
CrazyMax
6d4c483aa5 JetBrains License Server 20267 2019-07-19 11:46:30 +02:00
CrazyMax
2916fa7f0b Add FUNDING 2019-06-23 22:37:09 +02:00
CrazyMax
5fafea24ad Remove MicroBadger 2019-05-01 17:40:23 +02:00
CrazyMax
f514d57a24 GitHub bug report tpl 2019-04-28 20:05:10 +02:00
CrazyMax
6bdad5262c TravisCI notif 2019-04-28 20:04:57 +02:00
CrazyMax
63f898255f Update CHANGELOG 2019-04-02 21:08:10 +02:00
CrazyMax
894524f1dd Merge pull request #16 from crazy-max/19488
JetBrains License Server 19488
2019-04-02 21:05:17 +02:00
CrazyMax
b75cc3adf5 JetBrains License Server 19488 2019-04-02 21:03:57 +02:00
CrazyMax
0add8fa593 Linguist 2019-03-20 00:16:35 +01:00
Joseph Petersen
f5a5f6fd7e Upgrade to JetBrains License Server 19340 (#15) 2019-03-15 19:10:44 +01:00
CrazyMax
9f98240b42 Switch to Travis CI (com) 2019-02-04 21:55:51 +01:00
18 changed files with 426 additions and 199 deletions

View File

@@ -3,12 +3,11 @@
/*.iml
/.git
/.github
/.res
/examples
/.editorconfig
/.gitignore
/.travis.yml
/build.sh
/CHANGELOG.md
/LICENSE
/README.md

View File

@@ -3,14 +3,11 @@ root = true
[*]
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{Dockerfile,*.sh,*.yml}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
/*.sh linguist-detectable=false

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
patreon: crazymax
custom: https://www.paypal.me/crazyws

39
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
---
### Behaviour
#### Steps to reproduce this issue
1.
2.
3.
#### Expected behaviour
> Tell me what should happen
#### Actual behaviour
> Tell me what happens instead
### Configuration
* Docker version (type `docker --version`) :
* Docker compose version if applicable (type `docker-compose --version`) :
* Platform (Debian 9, Ubuntu 18.04, ...) :
* Include all necessary configuration files : `docker-compose.yml`, `.env`, ...
### Docker info
```
> Output of command `docker info`
```
### Logs
```
> Container logs (set LOG_LEVEL to debug if applicable)
```

30
.github/SUPPORT.md vendored Normal file
View File

@@ -0,0 +1,30 @@
# Support [![](https://isitmaintained.com/badge/resolution/crazy-max/docker-jetbrains-license-server.svg)](https://isitmaintained.com/project/crazy-max/docker-jetbrains-license-server)
## Reporting an issue
Please do a search in [open issues](https://github.com/crazy-max/docker-jetbrains-license-server/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.
If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.
:+1: - upvote
:-1: - downvote
If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below.
## Writing good bug reports and feature requests
File a single issue per problem and feature request.
* Do not enumerate multiple bugs or feature requests in the same issue.
* Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.
You are now ready to [create a new issue](https://github.com/crazy-max/docker-jetbrains-license-server/issues/new/choose)!
## Closure policy
* Support directly related to JetBrains License Server will not be provided if your problem is not related to the operation of this image.
* Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines.
* Issues that go a week without a response from original poster are subject to closure at my discretion.

69
.github/labels.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
## https://github.com/crazy-max/ghaction-github-labeler
- # bot
name: ":robot: bot"
color: "69cde9"
description: ""
- # bug
name: ":bug: bug"
color: "b60205"
description: ""
- # documentation
name: ":memo: documentation"
color: "c5def5"
description: ""
- # duplicate
name: ":busts_in_silhouette: duplicate"
color: "cccccc"
description: ""
- # enhancement
name: ":sparkles: enhancement"
color: "0054ca"
description: ""
- # feature request
name: ":bulb: feature request"
color: "0e8a16"
description: ""
- # feedback
name: ":mega: feedback"
color: "03a9f4"
description: ""
- # future maybe
name: ":rocket: future maybe"
color: "fef2c0"
description: ""
- # good first issue
name: ":hatching_chick: good first issue"
color: "7057ff"
description: ""
- # help wanted
name: ":pray: help wanted"
color: "4caf50"
description: ""
- # hold
name: ":hand: hold"
color: "24292f"
description: ""
- # invalid
name: ":no_entry_sign: invalid"
color: "e6e6e6"
description: ""
- # maybe bug
name: ":interrobang: maybe bug"
color: "ff5722"
description: ""
- # needs more info
name: ":thinking: needs more info"
color: "795548"
description: ""
- # question
name: ":question: question"
color: "3f51b5"
description: ""
- # upstream
name: ":eyes: upstream"
color: "fbca04"
description: ""
- # wontfix
name: ":coffin: wontfix"
color: "ffffff"
description: ""

78
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,78 @@
name: build
on:
pull_request:
branches: 'master'
push:
branches: 'master'
tags: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Prepare
id: prepare
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
echo ::set-output name=version::${TAG%-*}
else
echo ::set-output name=version::snapshot
fi
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=docker_platforms::linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
echo ::set-output name=docker_username::crazymax
echo ::set-output name=docker_image::crazymax/jetbrains-license-server
-
# https://github.com/crazy-max/ghaction-docker-buildx
name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
-
# https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v1
-
name: Docker Buildx (no push)
run: |
docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \
--output "type=image,push=false" \
--build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
--build-arg "VERSION=${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:latest" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--file Dockerfile .
-
name: Docker Login
if: success() && startsWith(github.ref, 'refs/tags/')
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin
-
name: Docker Buildx (push)
if: success() && startsWith(github.ref, 'refs/tags/')
run: |
docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \
--output "type=image,push=true" \
--build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
--build-arg "VERSION=${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:latest" \
--file Dockerfile .
-
name: Docker Check Manifest
if: always() && startsWith(github.ref, 'refs/tags/')
run: |
docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
-
name: Clear
if: always() && startsWith(github.ref, 'refs/tags/')
run: |
rm -f ${HOME}/.docker/config.json

25
.github/workflows/labels.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: labels
on:
push:
branches:
- 'master'
paths:
- '.github/labels.yml'
- '.github/workflows/labels.yml'
jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
# https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v1
-
# https://github.com/crazy-max/ghaction-github-labeler
name: Run Labeler
if: success()
uses: crazy-max/ghaction-github-labeler@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

66
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: test
on:
pull_request:
branches: master
push:
branches: master
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Prepare
id: prepare
run: |
echo ::set-output name=build_tag::test
echo ::set-output name=container_name::jetbrains-license-server
echo ::set-output name=running_timeout::120
echo ::set-output name=running_log_check::is listening on
-
# https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v1
-
# https://github.com/crazy-max/ghaction-docker-buildx
name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
-
name: Docker Buildx
run: |
docker buildx build --load --tag ${{ steps.prepare.outputs.build_tag }} --file Dockerfile .
-
name: Start container
run: |
docker rm -f ${{ steps.prepare.outputs.container_name }} > /dev/null 2>&1 || true
docker run -d --name ${{ steps.prepare.outputs.container_name }} \
-e "JLS_VIRTUAL_HOSTS=docker.test" \
${{ steps.prepare.outputs.build_tag }}
-
name: Test run
run: |
TIMEOUT=$((SECONDS + ${{ steps.prepare.outputs.running_timeout }}))
while read LOGLINE; do
echo ${LOGLINE}
if [[ ${LOGLINE} == *"${{ steps.prepare.outputs.running_log_check }}"* ]]; then
echo "🎉 Container up!"
break
fi
if [[ $SECONDS -gt ${TIMEOUT} ]]; then
>&2 echo "❌ Failed to run ${{ steps.prepare.outputs.container_name }} container"
docker rm -f ${{ steps.prepare.outputs.container_name }} > /dev/null 2>&1 || true
exit 1
fi
done < <(docker logs -f ${{ steps.prepare.outputs.container_name }} 2>&1)
CONTAINER_STATUS=$(docker container inspect --format "{{.State.Status}}" ${{ steps.prepare.outputs.container_name }})
if [[ ${CONTAINER_STATUS} != "running" ]]; then
>&2 echo "❌ Container ${{ steps.prepare.outputs.container_name }} returned status '$CONTAINER_STATUS'"
docker rm -f ${{ steps.prepare.outputs.container_name }} > /dev/null 2>&1 || true
exit 1
fi
docker rm -f ${{ steps.prepare.outputs.container_name }} > /dev/null 2>&1 || true
echo

BIN
.res/patreon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 956 B

View File

@@ -1,27 +0,0 @@
sudo: required
services:
- docker
env:
global:
- VERSION=18692
- DOCKER_LOGIN=crazymax
- DOCKER_USERNAME=crazymax
- DOCKER_REPONAME=jetbrains-license-server
- QUAY_LOGIN=crazymax
- QUAY_USERNAME=crazymax
- QUAY_REPONAME=jetbrains-license-server
- MICROBADGER_HOOK=https://hooks.microbadger.com/images/crazymax/jetbrains-license-server/PWF7sHnaK1djP4E9r5VY5suUqVk=
- secure: JwfXiiIM4c6E+80O6XHQBhw6IdkerfGxlKo+YHvmtkHyz5Fvpc1ZRvWSZYHZhxE1gocThbKUCy4GsgIyiq+dsER27kdAnnvp6JLw8SZ5OSqtOOLjqCKilN2hwFaS/g6Xc3mGvTo+4ScAc9CDJamDCwGY+6r2g/+IdmCbgqOo8yaD4VkhP4eVB3f4el6F7jEwjo626QDzFZ1LVS0qmmeVBSU+xxfL5HolG+j//hLQ/49XIIGnsWtQmHbX1u2trSESyNRTFdY/KZ7qaW8l+BgLhplKu+YXAExb1POGcKJnffSJjCl22ggX1JUHANMgrcQfZe2DKkUJFqr8FvTCktj+lfAuMYwl3k24zcZHe8eTyBFh8YLs7pn++tOFWg0XcKCWO9vzHgbTf/m95F6tpDMx4Y49jRclJIslxkjf8YIuNvDOO4kPKp2bw4ymqjsayPLx3P4xB8vgvyAZeFBQevUkh3ia/3uCfwEwzWimlT1FTeDUj8h4A9y+zRy/AqGf35LneC/Sbwt5dNaCujAwOGFeCvTp43uYd10S5Rz026ecH/8XlcHzuH4+nUvXDnesRI79+6NkaKl8PdcTx0ZC44jIAULn60rur5ybNkQmv5GWjem1C24izosPuC8bLHYY6BSRPn+vacNZH9SYTw2wHiVunxZORWz4FsYAidFkoaygt9E= # DOCKER_PASSWORD
- secure: Z+SIP2bLs70GcInLxGdYv68vXD47RIfowafFP8KpVt7EHki6AsIVJxrEH4/noj0jsx0Zyi93xAo+Z9Ms+BDsjUKeLjODS/mHjRQBrnryenjAnS8cRVvJUUDYcoY95SIOO4j6OSEIb+aI2d+6T2QX/iEgnEFDjiia2mLJ60orsWDtgoU7dgITB7ci4WkSMZl8VXtX7SUWKgVPRKkapfYX/AFUS41MZTnJvGQHCtTYlOMcS7fsf6ahjMvbTmf+otv2n688Mbg8Tz3cEw6YD5BHemfDq5qEJqjjnCtMIr5VSZttDwKwHsgmHrVEoiPq+Cdo+xwq3XCdfKu/qAD7NalBjNVaf6UjLjhkk4CWwLxQFnon1e8EC8GodXob4jQTGVOQX47lkPCvf6zM14GI1YxGMtofkv5ND7Ul/g+9fsn+b/QJFsuQb3ZA34pufjQQ5HRaj0ZU7izXIpUOu5EVo5ffrmUnrTisVNaSuIUonEt0p1WPFhdr1ScUc/VukF+wapDdSrSu/t8a5MXp0q3nZ+20NHlkm90o8umQqS8U1oo/n1hlEWTpC4PtRd4wggz0YNGTIKLpuxUt8HolU9rSPbGcbMLC53bNxnWd9KFaaFmRj5Np1GsBm2CDAPFYb3n/Dqyww+tg9Nk4MnCLMwROyZ+5Y7UQLtG5Tsh9tCtwPtT7Juk= # QUAY_PASSWORD
before_install:
- sudo apt-get update
- docker --version
script: ./build.sh
notifications:
webhooks:
secure: aSAfpOXZ2sZF4lR+e0Pi8O1/ePVft0wwSQm6L2nugmk+bIkZO/iC+SaNTK1rbbiba/zEjSmxvtA+3Sx+Sw9eOPZaP3sm6PvaVycukmZeUeVMlDUDDiV1xKshAisYuheVSO4kvRFzqoSo/IwClukHbGtYO9bquxgfy+Nan5wkzx0rzFDNsSChDbAEcnZKXxSrXSlOYVtY1fRcBTq52BwnBJzE4+6zDDNJz47sJY3dhAToodOpg+LkiX6b8kY8iAtEf25HKGrJ+O7mGLJOrtZmHLBQXAhcMHLNGtajuP3xZe/1Nq/rezRzbD/Tv7breXoIABnHR6y7oGf2Iry46Uzeg758AEYNU4FymD2sDz1zF1362OFBDq50pZm/MG2K4YqrKcWoy+TzCm4+H/XzsXG1jootRj2vsy1/QFL6zI/vVk6ZsN2ISSEFrJ2T/SZZWHxhYihGemfaSLoLZ0o316KrJxmzj37YucYjJYY/b+iAQruAFPJLd3vtanHfTaFQdUiXJdU7rrolESKI1zg/1cx5rV8PrnUZJXrSNATXgoyXsEvDRsdekHg8w+6ml6OenhgrNoJYG1c+GFtCf/cUaKe9bw6WniiqXtgw75Tdz0BqzNTu9BibhnDdeKYFBzT6wgsBRs47fgWcnmy++CryMvWymTdiiDnTaljUGB/rikA9QTk=

View File

@@ -1,32 +1,82 @@
# Changelog
## 21137-RC1 (2019/10/24)
* JetBrains License Server 21137
## 20308-RC4 (2019/10/10)
* Optimize layers
## 20308-RC3 (2019/10/10)
* Multi-platform Docker image
* Switch to GitHub Actions
* :warning: Stop publishing Docker image on Quay
* :warning: Run as non-root user
* Set timezone through tzdata
> :warning: **UPGRADE NOTES**
> As the Docker container now runs as a non-root user, you have to first stop the container and change permissions to `data` volume:
> ```
> docker-compose stop
> chown -R 1000:1000 data/
> docker-compose pull
> docker-compose up -d
> ```
## 20308-RC2 (2019/08/04)
* Add healthcheck
## 20308-RC1 (2019/07/30)
* JetBrains License Server 20308
## 20267-RC2 (2019/07/22)
* OpenJDK JRE 12
* Alpine Linux 3.10
## 20267-RC1 (2019/07/19)
* JetBrains License Server 20267
## 19488-RC1 (2019/04/02)
* JetBrains License Server 19488
## 19340-RC1 (2019/03/15)
* JetBrains License Server 19340
## 18692-RC2 (2019/01/22)
* Bind to unprivileged port : `8000`
## 18692-RC1 (2018/12/25)
* Upgrade to JetBrains License Server 18692
* JetBrains License Server 18692
## 17955-RC1 (2018/09/26)
* Upgrade to JetBrains License Server 17955
* JetBrains License Server 17955
## 17768-RC1 (2018/09/05)
* Upgrade to JetBrains License Server 17768
* JetBrains License Server 17768
## 17437-RC1 (2018/07/30)
* Upgrade to JetBrains License Server 17437
* JetBrains License Server 17437
## 17211-RC1 (2018/06/29)
* Upgrade to JetBrains License Server 17211
* JetBrains License Server 17211
## 17043-RC1 (2018/05/31)
* Upgrade to JetBrains License Server 17043
* JetBrains License Server 17043
## 16429-RC2 (2018/04/20)
@@ -34,12 +84,12 @@
## 16743-RC1 (2018/04/20)
* Upgrade to JetBrains License Server 16743
* JetBrains License Server 16743
* Replace Nginx + Let's Encrypt with Traefik (see docker-compose)
## 16429-RC1 (2018/03/20)
* Upgrade to JetBrains License Server 16429
* JetBrains License Server 16429
## 15802-RC2 (2018/02/16)

View File

@@ -1,9 +1,14 @@
FROM openjdk:8-jre-alpine
# syntax=docker/dockerfile:experimental
FROM --platform=${TARGETPLATFORM:-linux/amd64} adoptopenjdk:12-jre-hotspot
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n"
LABEL maintainer="CrazyMax" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="jetbrains-license-server" \
@@ -16,28 +21,40 @@ LABEL maintainer="CrazyMax" \
org.label-schema.schema-version="1.0"
ENV JLS_PATH="/opt/jetbrains-license-server" \
JLS_VERSION="18692" \
JLS_SHA256="e71c4abae7d144dda7af5775dd6812e93d5934de39134d97420b4b0db29e16f4"
JLS_VERSION="21137" \
JLS_SHA256="05241f0d41644ecc7679a879c829e57d423e151b997b45c5e986d498d6fe2f21" \
TZ="UTC"
COPY entrypoint.sh /entrypoint.sh
RUN apk --update --no-cache add \
RUN apt-get update \
&& apt-get install -y \
bash \
curl \
zip \
tzdata \
&& apk --update --no-cache add -t build-dependencies \
curl zip \
&& mkdir -p "$JLS_PATH" \
&& 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" \
&& chmod a+x /entrypoint.sh \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
&& groupadd -f -g 1000 jls \
&& useradd -o -s /bin/bash -d /data -u 1000 -g 1000 -m jls \
&& chown -R jls. /data "$JLS_PATH" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh
USER jls
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

View File

@@ -1,33 +1,45 @@
<p align="center"><a href="https://github.com/crazy-max/docker-jetbrains-license-server" target="_blank"><img height="128"src="https://raw.githubusercontent.com/crazy-max/docker-jetbrains-license-server/master/.res/docker-jetbrains-license-server.jpg"></a></p>
<p align="center">
<a href="https://microbadger.com/images/crazymax/jetbrains-license-server"><img src="https://images.microbadger.com/badges/version/crazymax/jetbrains-license-server.svg?style=flat-square" alt="Version"></a>
<a href="https://travis-ci.org/crazy-max/docker-jetbrains-license-server"><img src="https://img.shields.io/travis/crazy-max/docker-jetbrains-license-server/master.svg?style=flat-square" alt="Build Status"></a>
<a href="https://hub.docker.com/r/crazymax/jetbrains-license-server/tags?page=1&ordering=last_updated"><img src="https://img.shields.io/github/v/tag/crazy-max/docker-jetbrains-license-server?label=version&style=flat-square" alt="Latest Version"></a>
<a href="https://github.com/crazy-max/docker-jetbrains-license-server/actions?workflow=build"><img src="https://github.com/crazy-max/docker-jetbrains-license-server/workflows/build/badge.svg" alt="Build Status"></a>
<a href="https://hub.docker.com/r/crazymax/jetbrains-license-server/"><img src="https://img.shields.io/docker/stars/crazymax/jetbrains-license-server.svg?style=flat-square" alt="Docker Stars"></a>
<a href="https://hub.docker.com/r/crazymax/jetbrains-license-server/"><img src="https://img.shields.io/docker/pulls/crazymax/jetbrains-license-server.svg?style=flat-square" alt="Docker Pulls"></a>
<a href="https://quay.io/repository/crazymax/jetbrains-license-server"><img src="https://quay.io/repository/crazymax/jetbrains-license-server/status?style=flat-square" alt="Docker Repository on Quay"></a>
<a href="https://www.codacy.com/app/crazy-max/docker-jetbrains-license-server"><img src="https://img.shields.io/codacy/grade/eb420bc3e6ed49ff97cc261602228efa.svg?style=flat-square" alt="Code Quality"></a>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3BXL8EBDJALHQ"><img src="https://img.shields.io/badge/donate-paypal-7057ff.svg?style=flat-square" alt="Donate Paypal"></a>
<br /><a href="https://www.patreon.com/crazymax"><img src="https://img.shields.io/badge/donate-patreon-f96854.svg?logo=patreon&style=flat-square" alt="Support me on Patreon"></a>
<a href="https://www.paypal.me/crazyws"><img src="https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal&style=flat-square" alt="Donate Paypal"></a>
</p>
## About
🐳 [JetBrains License Server](https://www.jetbrains.com/help/license_server/getting_started.html) Docker image based on Alpine Linux.<br />
🐳 [JetBrains License Server](https://www.jetbrains.com/help/license_server/getting_started.html) Docker image based on AdoptOpenJDK.<br />
If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other 🐳 Docker images!
💡 Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun) project!
## Features
### Included
* License server completely customizable via environment variables
* Registration data and configuration in a single directory
### From docker-compose
* [Traefik](https://github.com/containous/traefik-library-image) as reverse proxy and creation/renewal of Let's Encrypt certificates
## Docker
### Multi-platform image
Following platforms for this image are available:
```
$ docker run --rm mplatform/mquery crazymax/jetbrains-license-server:latest
Image: crazymax/jetbrains-license-server:latest
* Manifest List: Yes
* Supported platforms:
- linux/amd64
- linux/arm64
- linux/ppc64le
- linux/s390x
```
### Environment variables
* `TZ` : The timezone assigned to the container (default `UTC`)
@@ -47,6 +59,8 @@ If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other
* `/data` : Contains [registration data](https://www.jetbrains.com/help/license_server/migrate.html) and configuration
> :warning: Note that the volume should be owned by uid `1000` and gid `1000`. If you don't give the volume correct permissions, the container may not start.
### Ports
* `8000` : Jetbrains License Server HTTP port
@@ -105,7 +119,8 @@ All kinds of contributions are welcome :raised_hands:!<br />
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:<br />
But we're not gonna lie to each other, I'd rather you buy me a beer or two :beers:!
[![Paypal](.res/paypal.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3BXL8EBDJALHQ)
[![Support me on Patreon](.res/patreon.png)](https://www.patreon.com/crazymax)
[![Paypal Donate](.res/paypal.png)](https://www.paypal.me/crazyws)
## License

126
build.sh
View File

@@ -1,126 +0,0 @@
#!/usr/bin/env bash
set -e
PROJECT=jetbrains-license-server
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
BUILD_TAG=docker_build
BUILD_WORKINGDIR=${BUILD_WORKINGDIR:-.}
DOCKERFILE=${DOCKERFILE:-Dockerfile}
VCS_REF=${TRAVIS_COMMIT::7}
RUNNING_TIMEOUT=120
RUNNING_LOG_CHECK="is listening on"
PUSH_LATEST=${PUSH_LATEST:-true}
DOCKER_USERNAME=${DOCKER_USERNAME:-crazymax}
DOCKER_LOGIN=${DOCKER_LOGIN:-crazymax}
DOCKER_REPONAME=${DOCKER_REPONAME:-jetbrains-license-server}
QUAY_USERNAME=${QUAY_USERNAME:-crazymax}
QUAY_LOGIN=${QUAY_LOGIN:-crazymax}
QUAY_REPONAME=${QUAY_REPONAME:-jetbrains-license-server}
# Check local or travis
BRANCH=${TRAVIS_BRANCH:-local}
if [[ ${TRAVIS_PULL_REQUEST} == "true" ]]; then
BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
fi
DOCKER_TAG=${BRANCH:-local}
if [[ "$BRANCH" == "master" ]]; then
DOCKER_TAG=latest
elif [[ "$BRANCH" == "local" ]]; then
BUILD_DATE=
VERSION=local
fi
echo "PROJECT=${PROJECT}"
echo "VERSION=${VERSION}"
echo "BUILD_DATE=${BUILD_DATE}"
echo "BUILD_TAG=${BUILD_TAG}"
echo "BUILD_WORKINGDIR=${BUILD_WORKINGDIR}"
echo "DOCKERFILE=${DOCKERFILE}"
echo "VCS_REF=${VCS_REF}"
echo "PUSH_LATEST=${PUSH_LATEST}"
echo "DOCKER_LOGIN=${DOCKER_LOGIN}"
echo "DOCKER_USERNAME=${DOCKER_USERNAME}"
echo "DOCKER_REPONAME=${DOCKER_REPONAME}"
echo "QUAY_LOGIN=${QUAY_LOGIN}"
echo "QUAY_USERNAME=${QUAY_USERNAME}"
echo "QUAY_REPONAME=${QUAY_REPONAME}"
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}"
echo "TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}"
echo "BRANCH=${BRANCH}"
echo "DOCKER_TAG=${DOCKER_TAG}"
echo
# Build
echo "### Build"
docker build \
--build-arg BUILD_DATE=${BUILD_DATE} \
--build-arg VCS_REF=${VCS_REF} \
--build-arg VERSION=${VERSION} \
-t ${BUILD_TAG} -f ${DOCKERFILE} ${BUILD_WORKINGDIR}
echo
echo "### Test"
docker rm -f ${PROJECT} > /dev/null 2>&1 || true
docker run -d -p 8000:8000 \
-e "JLS_VIRTUAL_HOSTS=docker.test" \
--name ${PROJECT} ${BUILD_TAG}
echo
echo "### Waiting for ${PROJECT} to be up..."
TIMEOUT=$((SECONDS + RUNNING_TIMEOUT))
while read LOGLINE; do
echo ${LOGLINE}
if [[ ${LOGLINE} == *"${RUNNING_LOG_CHECK}"* ]]; then
echo "Container up!"
break
fi
if [[ $SECONDS -gt ${TIMEOUT} ]]; then
>&2 echo "ERROR: Failed to run ${PROJECT} container"
docker rm -f ${PROJECT} > /dev/null 2>&1 || true
exit 1
fi
done < <(docker logs -f ${PROJECT} 2>&1)
echo
CONTAINER_STATUS=$(docker container inspect --format "{{.State.Status}}" ${PROJECT})
if [[ ${CONTAINER_STATUS} != "running" ]]; then
>&2 echo "ERROR: Container ${PROJECT} returned status '$CONTAINER_STATUS'"
docker rm -f ${PROJECT} > /dev/null 2>&1 || true
exit 1
fi
docker rm -f ${PROJECT} > /dev/null 2>&1 || true
if [ "${VERSION}" == "local" -o "${TRAVIS_PULL_REQUEST}" == "true" ]; then
echo "INFO: This is a PR or a local build, skipping push..."
exit 0
fi
if [[ ! -z ${DOCKER_PASSWORD} ]]; then
echo "### Push to Docker Hub..."
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_LOGIN" --password-stdin > /dev/null 2>&1
if [ "${DOCKER_TAG}" == "latest" -a "${PUSH_LATEST}" == "true" ]; then
docker tag ${BUILD_TAG} ${DOCKER_USERNAME}/${DOCKER_REPONAME}:${DOCKER_TAG}
fi
if [[ "${VERSION}" != "latest" ]]; then
docker tag ${BUILD_TAG} ${DOCKER_USERNAME}/${DOCKER_REPONAME}:${VERSION}
fi
docker push ${DOCKER_USERNAME}/${DOCKER_REPONAME}
if [[ ! -z ${MICROBADGER_HOOK} ]]; then
echo "Call MicroBadger hook"
curl -X POST ${MICROBADGER_HOOK}
echo
fi
echo
fi
if [[ ! -z ${QUAY_PASSWORD} ]]; then
echo "### Push to Quay..."
echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_LOGIN" --password-stdin > /dev/null 2>&1
if [ "${DOCKER_TAG}" == "latest" -a "${PUSH_LATEST}" == "true" ]; then
docker tag ${BUILD_TAG} quay.io/${QUAY_USERNAME}/${QUAY_REPONAME}:${DOCKER_TAG}
fi
if [[ "${VERSION}" != "latest" ]]; then
docker tag ${BUILD_TAG} quay.io/${QUAY_USERNAME}/${QUAY_REPONAME}:${VERSION}
fi
docker push quay.io/${QUAY_USERNAME}/${QUAY_REPONAME}
echo
fi

View File

@@ -1,21 +1,13 @@
#!/bin/sh
TZ=${TZ:-UTC}
JLS_PATH="/opt/jetbrains-license-server"
JLS_LISTEN_ADDRESS="0.0.0.0"
JLS_PORT=8000
JLS_CONTEXT=${JLS_CONTEXT:-/}
JLS_ACCESS_CONFIG=${JLS_ACCESS_CONFIG:-/data/access-config.json}
# Timezone
echo "Setting timezone to ${TZ}..."
ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
echo ${TZ} > /etc/timezone
# Init
echo "Initializing files and folders..."
mkdir -p /data/registration
ln -sf "/data/registration" "/root/.jb-license-server"
touch "/data/access-config.json"
# https://www.jetbrains.com/help/license_server/setting_host_and_port.html
@@ -24,7 +16,7 @@ license-server configure --listen ${JLS_LISTEN_ADDRESS} --port ${JLS_PORT} --con
# https://www.jetbrains.com/help/license_server/setting_host_and_port.html
if [ ! -z "$JLS_VIRTUAL_HOSTS" ] ; then
echo "Following virtual hosts will be used :"
echo "Following virtual hosts will be used:"
for JLS_VIRTUAL_HOST in $(echo ${JLS_VIRTUAL_HOSTS} | tr "," "\n"); do
echo "-> ${JLS_VIRTUAL_HOST}"
done