diff --git a/Dockerfile b/Dockerfile index e0d31bf..7e0b5b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM alpine:latest +ARG VERSION + RUN apk add --no-cache openjdk25 RUN mkdir -p /data /data/local @@ -7,6 +9,8 @@ RUN mkdir -p /data /data/local COPY docker/config.json /data/config.json COPY docker/entrypoint.sh /entrypoint.sh +COPY launcher/target/${VERSION}.pfapp /default.pfapp + RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/Jenkinsfile b/Jenkinsfile index ba2e197..01b3a54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,7 +46,7 @@ pipeline { stage('Build docker image') { steps { - sh "docker build -f Dockerfile -t pfsdn:${VERSION} ." + sh "docker build -f Dockerfile --build-arg VERSION=${VERSION} -t pfsdn:${VERSION} ." echo "Saving docker image pfsdn:${VERSION}" sh "docker save pfsdn:${VERSION} | gzip > pfsdn-${VERSION}.tar.gz" } diff --git a/build-docker-image.sh b/build-docker-image.sh deleted file mode 100755 index 8b72e35..0000000 --- a/build-docker-image.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - - docker build -f docker/Dockerfile -t pfsdn . - docker save -o pfsdn.tar pfsdn \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 29f378c..2042987 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec java -Xmx256m -Dapp.external.management=true -jar default.pfapp --c=/data/config.json -l=. -r="https://repo.kirillius.ru/apps/pf/" \ No newline at end of file +exec java -Xmx256m -Dapp.external.management=true -jar default.pfapp --c=/data/config.json -l=. -r="https://objects.repo.kirillius.ru/service/rest/repository/browse/object-storage/apps/" \ No newline at end of file