From 5fbf7bb967b81058f6b6ac5eb3ac7aa6ed3e0adf Mon Sep 17 00:00:00 2001 From: any1 Date: Fri, 8 May 2020 11:12:51 +0200 Subject: [PATCH] [feat] use openjdk for docker images --- docker/Dockerfile | 11 ++-- docker/start-lite-wallet.sh | 112 ------------------------------------ 2 files changed, 6 insertions(+), 117 deletions(-) delete mode 100644 docker/start-lite-wallet.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index 032427322..a8b3724ce 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ RUN git clone --depth 1 https://github.com/xel-software/xel-lite-wallet /code # # Maven build # -FROM maven:3.6.3-adoptopenjdk-11 as build +FROM maven:3.6.3-openjdk-11 as build COPY --from=sources /code/ /build/ @@ -17,15 +17,16 @@ RUN cd /build && mvn package # # Final image # -FROM adoptopenjdk:11-jre-openj9-bionic +FROM openjdk:11.0.7-jre-slim-buster + RUN mkdir /opt/app -COPY --from=build /build/xel-lite-wallet.jar /opt/app/xel-lite-wallet.jar -COPY --from=sources /code/docker/start-lite-wallet.sh /opt/app/start-lite-wallet.sh +COPY --from=build /build/xel-lite-wallet.jar /opt/app/xel-wallet.jar COPY --from=sources /code/run.sh /opt/app/run.sh COPY --from=sources /code/conf/ /opt/app/conf/ COPY --from=sources /code/html/ /opt/app/html/ COPY --from=sources /code/logs/ /opt/app/logs/ WORKDIR /opt/app -ENTRYPOINT bash start-lite-wallet.sh + +CMD java ${JAVA_OPTS} -cp xel-wallet.jar:conf nxt.Nxt diff --git a/docker/start-lite-wallet.sh b/docker/start-lite-wallet.sh deleted file mode 100644 index 8270714eb..000000000 --- a/docker/start-lite-wallet.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -#cd /xel-lite-wallet - -echo "set config..." - -CONFIG_FILE=conf/nxt.properties - -if [ ! -z ${nxt_adminPassword+x} ] -then - echo "set nxt.adminPassword=HIDDEN" - echo "nxt.adminPassword=${nxt_adminPassword}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_apiServerHost+x} ] -then - echo "set nxt.apiServerHost=${nxt_apiServerHost}" - echo "nxt.apiServerHost=${nxt_apiServerHost}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_peerServerHost+x} ] -then - echo "set nxt.peerServerHost=${nxt_peerServerHost}" - echo "nxt.peerServerHost=${nxt_peerServerHost}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_defaultPeers+x} ] -then - echo "set nxt.defaultPeers=${nxt_defaultPeers}" - echo "nxt.defaultPeers=${nxt_defaultPeers}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_allowedUserHosts+x} ] -then - echo "set nxt.allowedUserHosts=${nxt_allowedUserHosts}" - echo "nxt.allowedUserHosts=${nxt_allowedUserHosts}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_wellKnownPeers+x} ] -then - echo "set nxt.wellKnownPeers=${nxt_wellKnownPeers}" - echo "nxt.wellKnownPeers=${nxt_wellKnownPeers}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_allowedBotHosts+x} ] -then - echo "set nxt.allowedBotHosts=${nxt_allowedBotHosts}" - echo "nxt.allowedBotHosts=${nxt_allowedBotHosts}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_myPlatform+x} ] -then - echo "set nxt.myPlatform=${nxt_myPlatform}" - echo "nxt.myPlatform=${nxt_myPlatform}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_myAddress+x} ] -then - echo "set nxt.myAddress=${nxt_myAddress}" - echo "nxt.myAddress=${nxt_myAddress}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_myHallmark+x} ] -then - echo "set nxt.myHallmark=${nxt_myHallmark}" - echo "nxt.myHallmark=${nxt_myHallmark}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_disableAdminPassword+x} ] -then - echo "set nxt.disableAdminPassword=${nxt_disableAdminPassword}" - echo "nxt.disableAdminPassword=${nxt_disableAdminPassword}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_enableAPIUPnP+x} ] -then - echo "set nxt.enableAPIUPnP=${nxt_enableAPIUPnP}" - echo "nxt.enableAPIUPnP=${nxt_enableAPIUPnP}" >> ${CONFIG_FILE} -fi - -if [ ! -z ${nxt_faucet+x} ] -then - echo "set nxt.faucet=${nxt_faucet}" - echo "nxt.faucet=${nxt_faucet}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_faucetPassphrase+x} ] -then - echo "set nxt.faucetPassphrase=***" - echo "nxt.faucetPassphrase=${nxt_faucetPassphrase}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_faucetLockout+x} ] -then - echo "set nxt.faucetLockout=${nxt_faucetLockout}" - echo "nxt.faucetLockout=${nxt_faucetLockout}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_faucetAmount+x} ] -then - echo "set nxt.faucetAmount=${nxt_faucetAmount}" - echo "nxt.faucetAmount=${nxt_faucetAmount}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_isTestnet+x} ] -then - echo "set nxt.isTestnet=${nxt_isTestnet}" - echo "nxt.isTestnet=${nxt_isTestnet}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_defaultTestnetPeers+x} ] -then - echo "set nxt.defaultTestnetPeers=${nxt_defaultTestnetPeers}" - echo "nxt.defaultTestnetPeers=${nxt_defaultTestnetPeers}" >> ${CONFIG_FILE} -fi -if [ ! -z ${nxt_testnetPeers+x} ] -then - echo "set nxt.testnetPeers=${nxt_testnetPeers}" - echo "nxt.testnetPeers=${nxt_testnetPeers}" >> ${CONFIG_FILE} -fi - -if [ ! -z ${JAVA_OPTS+x} ] -then - export JAVA_OPTS=${JAVA_OPTS} - echo "set JAVA_OPTS=${JAVA_OPTS}" -fi - -./run.sh