Skip to content

Commit

Permalink
+ update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
feborghi authored and feborghi committed Apr 24, 2024
1 parent 878641d commit 12ab25c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FROM openjdk:8-alpine
ARG VERSION
ARG DB_VERSION

COPY ./rest/target/ROOT.zip .

RUN apk update && apk add --no-cache \
bash \
curl \
Expand All @@ -16,10 +18,9 @@ RUN apk update && apk add --no-cache \
# Fetch latest tagged versions if not specified
&& if [ -z $VERSION ]; then VERSION=$(curl -s https://api.github.com/repos/ConfigHubPub/ConfigHubPlatform/releases/latest | grep tag_name | grep -oe '[\.0-9]*'); fi \
&& if [ -z $DB_VERSION ]; then DB_VERSION=$(curl -s https://api.github.com/repos/ConfigHubPub/Database-Manager/releases/latest | grep tag_name | grep -oe '[\.0-9]*'); fi \
&& wget -q https://github.com/ConfigHubPub/ConfigHubPlatform/releases/download/v${VERSION}/confighub-v${VERSION}.tar.gz \
&& tar -xzvf confighub-v${VERSION}.tar.gz \
&& rm confighub-v${VERSION}.tar.gz \
&& mv confighub-v${VERSION} confighub \
&& unzip ROOT.zip \
&& rm ROOT.zip \
&& mv ROOT confighub\server \
&& wget -O ConfigHubDBManager.jar -q https://github.com/ConfigHubPub/Database-Manager/releases/download/v${DB_VERSION}/ConfigHubDBManager-${DB_VERSION}.jar \
&& rm /bin/sh && ln -s /bin/bash /bin/sh
# Fixes a bug where /bin/sh on alpine can't do <<<.
Expand Down

0 comments on commit 12ab25c

Please sign in to comment.