100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Unified dockerfiles, finished post_build
Christian Bauerf1d8908792f3
diff --git a/Dockerfile b/Dockerfileindex 486b13ccf..ad856a5b1 100644--- a/Dockerfile+++ b/Dockerfile@@ -29,15 +29,6 @@ RUN { \RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-homeENV JAVA_HOME /docker-java-home-ENV JAVA_VERSION 8u181-ENV JAVA_DEBIAN_VERSION 8u181-b13-2~deb9u1--# see https://bugs.debian.org/775775-# and https://github.com/docker-library/java/issues/19#issuecomment-70546872-# and https://packages.debian.org/stretch/ca-certificates-java-# TODO This seems to be fixed now?-#ENV CA_CERTIFICATES_JAVA_VERSION 20170929~deb9u1-RUN set -ex; \\# deal with slim variants not having man page directories (which causes "update-alternatives" to fail)@@ -47,7 +38,7 @@ RUN set -ex; \\apt-get update; \apt-get install -y \- openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \+ openjdk-8-jdk \ca-certificates-java\; \rm -rf /var/lib/apt/lists/*; \@@ -60,14 +51,14 @@ RUN set -ex; \# ... and verify that it actually worked for one of the alternatives we care aboutupdate-alternatives --query java | grep -q 'Status: manual'-# see CA_CERTIFICATES_JAVA_VERSION notes above+# Run postinst because it might not happen on installRUN /var/lib/dpkg/info/ca-certificates-java.postinst configure# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadadARG GIT_COMMIT=unknownLABEL git-commit=$GIT_COMMIT-ENV JAVA_OPTS -Xmx1g+############ EDITS ABOVE THIS LINE SHOULD BE DONE IN ALL DOCKERFILES! ################# Install Docker clientRUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -@@ -79,4 +70,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \docker-ce docker-ce-cli containerd.io \&& rm -rf /var/lib/apt/lists/*-VOLUME src\ No newline at end of file+# Install Docker Compose executable+RUN curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` \+ -o /usr/local/bin/docker-compose && \+ chmod +x /usr/local/bin/docker-compose++# Install NodeJS 10 and Yarn+RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \+ apt-get install -y nodejs && \+ npm install --global yarn++WORKDIR /openremote\ No newline at end of filediff --git a/hooks/post_build b/hooks/post_buildindex 8de60d4c5..fceaad33f 100644--- a/hooks/post_build+++ b/hooks/post_build@@ -1,10 +1,20 @@#!/bin/bashecho "===> Building OpenRemote source"-docker run --privileged \- -v $(pwd):/src \+docker run -v $(pwd):/openremote \+ $IMAGE_NAME \+ /bin/sh -c "./gradlew --console plain clean installDist"++echo "===> Building OpenRemote images"+docker run \+ -v $(pwd):/openremote \-v /var/run/docker.sock:/var/run/docker.sock \+ --env DATE_TAG=$CACHE_TAG \$IMAGE_NAME \- cd /src && ./gradlew clean build installDist+ /bin/sh -c "docker-compose -f profile/deploy.yml build --build-arg GIT_COMMIT=$SOURCE_COMMIT"-echo "===> Building OpenRemote images"-docker-compose -p openremote build\ No newline at end of file+echo "===> Pushing OpenRemote images"+docker push openremote/manager:$CACHE_TAG+docker push openremote/keycloak:$CACHE_TAG+docker push openremote/proxy:$CACHE_TAG+docker push openremote/postgresql:$CACHE_TAG+docker push openremote/tileserver-gl:$CACHE_TAGdiff --git a/keycloak/Dockerfile b/keycloak/Dockerfileindex 612928c4c..41a616179 100644--- a/keycloak/Dockerfile+++ b/keycloak/Dockerfile@@ -1,8 +1,11 @@FROM debian:stretchMAINTAINER [email protected]-# Install curl, wget, ca-certificates, procps+# Install utilitiesRUN apt-get update && apt-get install -y --no-install-recommends \+ apt-transport-https \+ gnupg2 \+ software-properties-common \procps \ca-certificates \curl \@@ -26,14 +29,6 @@ RUN { \RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-homeENV JAVA_HOME /docker-java-home-ENV JAVA_VERSION 8u181-ENV JAVA_DEBIAN_VERSION 8u181-b13-2~deb9u1--# see https://bugs.debian.org/775775-# and https://github.com/docker-library/java/issues/19#issuecomment-70546872-# and https://packages.debian.org/stretch/ca-certificates-java-ENV CA_CERTIFICATES_JAVA_VERSION 20170929~deb9u1-RUN set -ex; \\# deal with slim variants not having man page directories (which causes "update-alternatives" to fail)@@ -43,8 +38,8 @@ RUN set -ex; \\apt-get update; \apt-get install -y \- openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \- ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \+ openjdk-8-jdk \+ ca-certificates-java\; \rm -rf /var/lib/apt/lists/*; \\@@ -56,9 +51,15 @@ RUN set -ex; \# ... and verify that it actually worked for one of the alternatives we care aboutupdate-alternatives --query java | grep -q 'Status: manual'-# see CA_CERTIFICATES_JAVA_VERSION notes above+# Run postinst because it might not happen on installRUN /var/lib/dpkg/info/ca-certificates-java.postinst configure+# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad+ARG GIT_COMMIT=unknown+LABEL git-commit=$GIT_COMMIT++############ EDITS ABOVE THIS LINE SHOULD BE DONE IN ALL DOCKERFILES! ################+# Install dependencies for JBoss ASRUN apt-get update \&& apt-get install -y --no-install-recommends \diff --git a/keycloak/dev.Dockerfile b/keycloak/dev.Dockerfileindex b6c7f3970..e696b7d02 100644--- a/keycloak/dev.Dockerfile+++ b/keycloak/dev.Dockerfile@@ -1,8 +1,11 @@FROM debian:stretchMAINTAINER [email protected]-# Install curl, wget, ca-certificates, procps+# Install utilitiesRUN apt-get update && apt-get install -y --no-install-recommends \+ apt-transport-https \+ gnupg2 \+ software-properties-common \procps \ca-certificates \curl \@@ -26,14 +29,6 @@ RUN { \RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-homeENV JAVA_HOME /docker-java-home-ENV JAVA_VERSION 8u181-ENV JAVA_DEBIAN_VERSION 8u181-b13-2~deb9u1--# see https://bugs.debian.org/775775-# and https://github.com/docker-library/java/issues/19#issuecomment-70546872-# and https://packages.debian.org/stretch/ca-certificates-java-ENV CA_CERTIFICATES_JAVA_VERSION 20170929~deb9u1-RUN set -ex; \\# deal with slim variants not having man page directories (which causes "update-alternatives" to fail)@@ -43,8 +38,8 @@ RUN set -ex; \\apt-get update; \apt-get install -y \- openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \- ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \+ openjdk-8-jdk \+ ca-certificates-java\; \rm -rf /var/lib/apt/lists/*; \\@@ -56,9 +51,15 @@ RUN set -ex; \# ... and verify that it actually worked for one of the alternatives we care aboutupdate-alternatives --query java | grep -q 'Status: manual'-# see CA_CERTIFICATES_JAVA_VERSION notes above+# Run postinst because it might not happen on installRUN /var/lib/dpkg/info/ca-certificates-java.postinst configure+# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad+ARG GIT_COMMIT=unknown+LABEL git-commit=$GIT_COMMIT++############ EDITS ABOVE THIS LINE SHOULD BE DONE IN ALL DOCKERFILES! ################+# Install dependencies for JBoss ASRUN apt-get update \&& apt-get install -y --no-install-recommends \diff --git a/manager/Dockerfile b/manager/Dockerfileindex dad536cf1..3364ef334 100644--- a/manager/Dockerfile+++ b/manager/Dockerfile@@ -1,8 +1,11 @@FROM debian:stretchMAINTAINER [email protected]-# Install curl, wget, ca-certificates, procps+# Install utilitiesRUN apt-get update && apt-get install -y --no-install-recommends \+ apt-transport-https \+ gnupg2 \+ software-properties-common \procps \ca-certificates \curl \@@ -26,14 +29,6 @@ RUN { \RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-homeENV JAVA_HOME /docker-java-home-ENV JAVA_VERSION 8u181-ENV JAVA_DEBIAN_VERSION 8u181-b13-2~deb9u1--# see https://bugs.debian.org/775775-# and https://github.com/docker-library/java/issues/19#issuecomment-70546872-# and https://packages.debian.org/stretch/ca-certificates-java-ENV CA_CERTIFICATES_JAVA_VERSION 20170929~deb9u1-RUN set -ex; \\# deal with slim variants not having man page directories (which causes "update-alternatives" to fail)@@ -43,8 +38,8 @@ RUN set -ex; \\apt-get update; \apt-get install -y \- openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \- ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \+ openjdk-8-jdk \+ ca-certificates-java\; \rm -rf /var/lib/apt/lists/*; \\@@ -56,13 +51,15 @@ RUN set -ex; \# ... and verify that it actually worked for one of the alternatives we care aboutupdate-alternatives --query java | grep -q 'Status: manual'-# see CA_CERTIFICATES_JAVA_VERSION notes above+# Run postinst because it might not happen on installRUN /var/lib/dpkg/info/ca-certificates-java.postinst configure# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadadARG GIT_COMMIT=unknownLABEL git-commit=$GIT_COMMIT+############ EDITS ABOVE THIS LINE SHOULD BE DONE IN ALL DOCKERFILES! ################+ENV JAVA_OPTS -Xmx1gENV APP_DOCROOT /deployment/manager/appdiff --git a/postgresql/Dockerfile b/postgresql/Dockerfileindex 17af94dad..0ab67b909 100644--- a/postgresql/Dockerfile+++ b/postgresql/Dockerfile@@ -1,8 +1,11 @@FROM debian:stretchMAINTAINER [email protected]-# Install curl, wget, ca-certificates, procps+# Install utilitiesRUN apt-get update && apt-get install -y --no-install-recommends \+ apt-transport-https \+ gnupg2 \+ software-properties-common \procps \ca-certificates \curl \diff --git a/proxy/Dockerfile b/proxy/Dockerfileindex 865c1ec53..778685f0a 100644--- a/proxy/Dockerfile+++ b/proxy/Dockerfile@@ -1,8 +1,11 @@FROM debian:stretchMAINTAINER [email protected]-# Install curl, wget, ca-certificates, procps+# Install utilitiesRUN apt-get update && apt-get install -y --no-install-recommends \+ apt-transport-https \+ gnupg2 \+ software-properties-common \procps \ca-certificates \curl \