diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 5ef043934..c254a707c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -38,7 +38,7 @@ jobs: with: builder: ${{ steps.buildx.outputs.name }} context: ./ - file: ./Dockerfile-Java-11 + file: ./Dockerfile platforms: linux/amd64,linux/arm64/v8 push: true tags: norstella/oxalis:6.0.0-latest-java11 diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 6663fa5aa..ac3b27f09 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -61,7 +61,7 @@ jobs: with: builder: ${{ steps.buildx.outputs.name }} context: ./ - file: ./Dockerfile-Java-11 + file: ./Dockerfile platforms: linux/amd64,linux/arm64/v8 push: true tags: norstella/oxalis:6.0.0 diff --git a/Dockerfile b/Dockerfile index 647624947..c47c1a6ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.3.9-jdk-8 AS mvn +FROM maven:3.8.6-jdk-11 AS mvn ADD . $MAVEN_HOME @@ -26,7 +26,7 @@ RUN cd $MAVEN_HOME \ && find /oxalis -name .gitkeep -exec rm -rf '{}' \; -FROM openjdk:8u212-jre-alpine3.9 as oxalis-base +FROM openjdk:11.0.16-jre as oxalis-base COPY --from=mvn /oxalis /oxalis diff --git a/Dockerfile-Java-11 b/Dockerfile-Java-11 deleted file mode 100644 index c47c1a6ce..000000000 --- a/Dockerfile-Java-11 +++ /dev/null @@ -1,43 +0,0 @@ -FROM maven:3.8.6-jdk-11 AS mvn - -ADD . $MAVEN_HOME - -RUN cd $MAVEN_HOME \ - && mvn -B clean package -Pdist -DskipTests=true -Dgit.shallow=true \ - && mv $MAVEN_HOME/target/oxalis-server /oxalis-server \ - && mv $MAVEN_HOME/target/oxalis-standalone /oxalis-standalone \ - && mkdir -p /oxalis/lib \ - && for f in $(ls /oxalis-server/lib); do \ - if [ -e /oxalis-standalone/lib/$f ]; then \ - mv /oxalis-server/lib/$f /oxalis/lib/; \ - rm /oxalis-standalone/lib/$f; \ - fi; \ - done \ - && mv /oxalis-server/bin /oxalis/bin-server \ - && mv /oxalis-server/lib /oxalis/lib-server \ - && mv /oxalis-standalone/bin /oxalis/bin-standalone \ - && mv /oxalis-standalone/lib /oxalis/lib-standalone \ - && cat /oxalis/bin-server/run.sh | sed "s|lib/\*|lib-server/*:lib/*|" > /oxalis/bin-server/run-docker.sh \ - && chmod 755 /oxalis/bin-server/run-docker.sh \ - && cat /oxalis/bin-standalone/run.sh | sed "s|lib/\*|lib-standalone/*:lib/*|" > /oxalis/bin-standalone/run-docker.sh \ - && chmod 755 /oxalis/bin-standalone/run-docker.sh \ - && mkdir /oxalis/bin /oxalis/conf /oxalis/ext /oxalis/inbound /oxalis/outbound /oxalis/plugin \ - && printf "#!/bin/sh\n\nexec /oxalis/bin-\$MODE/run-docker.sh \$@" > /oxalis/bin/run-docker.sh \ - && find /oxalis -name .gitkeep -exec rm -rf '{}' \; - - -FROM openjdk:11.0.16-jre as oxalis-base - -COPY --from=mvn /oxalis /oxalis - -ENV MODE server - -FROM oxalis-base as oxalis - -VOLUME /oxalis/conf /oxalis/ext /oxalis/inbound /oxalis/outbound /oxalis/plugin - -EXPOSE 8080 - -WORKDIR /oxalis - -ENTRYPOINT ["sh", "bin/run-docker.sh"]