FROM mariadb:10 #ENV MYSQL_ROOT_HOST % ENV MYSQL_ROOT_PASSWORD powerS ENV MYSQL_DATABASE hnd ENV MYSQL_USER hnd ENV MYSQL_PASSWORD powerS15 RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ unzip \ xz-utils \ && rm -rf /var/lib/apt/lists/* # Default to UTF-8 file.encoding ENV LANG C.UTF-8 # add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo '#!/bin/sh'; \ echo 'set -e'; \ echo; \ echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home # do some fancy footwork to create a JAVA_HOME that's cross-architecture-safe RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home ENV JAVA_HOME /docker-java-home ENV JAVA_VERSION 8u171 ENV JAVA_DEBIAN_VERSION 8u171-b11-1~bpo8+1 # see https://bugs.debian.org/775775 # and https://github.com/docker-library/java/issues/19#issuecomment-70546872 ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1 # deal with slim variants not having man page directories (which causes "update-alternatives" to fail) RUN set -ex; \ if [ ! -d /usr/share/man/man1 ]; then \ mkdir -p /usr/share/man/man1; \ fi; \ echo 'deb http://ftp.se.debian.org/debian/ jessie main contrib non-free' > /etc/apt/sources.list.d/jessie.list && \ echo 'deb http://http.debian.net/debian/ jessie-backports main contrib non-free' > /etc/apt/sources.list.d/jessie-backports.list && \ apt-get update && \ apt-get install -y --no-install-recommends \ openjdk-8-jdk-headless="$JAVA_DEBIAN_VERSION" \ ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \ ca-certificates \ openssl \ wget="1.16-1+deb8u5" \ libapr1-dev \ coreutils \ dpkg-dev dpkg \ gcc \ libc-dev \ make \ libssl1.0.0="1.0.2l-1~bpo8+1" \ libssl-dev="1.0.2l-1~bpo8+1" \ apache2 ;\ rm -rf /var/lib/apt/lists/* # verify that "docker-java-home" returns what we expect # update-alternatives so that future installs of other OpenJDK versions don't change /usr/bin/java # ... and verify that it actually worked for one of the alternatives we care about RUN set -ex; \ apt-get purge -y openjdk-7-jre-headless ; \ [ "$(readlink -f "$JAVA_HOME")" = "$(docker-java-home)" ]; \ update-alternatives --get-selections | awk -v home="$(readlink -f "$JAVA_HOME")" 'index($3, home) == 1 { $2 = "manual"; print | "update-alternatives --set-selections" }'; \ update-alternatives --query java | grep -q 'Status: manual' # see CA_CERTIFICATES_JAVA_VERSION notes above RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure # If you're reading this and have any feedback on how this image could be # improved, please open an issue or a pull request so we can discuss it! # # https://github.com/docker-library/openjdk/issues ENV DEBIAN_FRONTEND noninteractive RUN set -e \ && apt-get update \ && apt-get install -y --no-install-recommends supervisor sasl2-bin vim mc rsyslog \ build-essential libssl-dev curl WORKDIR /usr/local/handelion ADD assets/wildfly-11.0.0.Final.zip /usr/local/handelion RUN unzip /usr/local/handelion/wildfly-11.0.0.Final.zip -d wildfly RUN rm /usr/local/handelion/wildfly-11.0.0.Final.zip && mkdir /usr/local/handelion/front VOLUME /usr/local/handelion/wildfly/standalone/deployments VOLUME /usr/local/handelion/front EXPOSE 80 EXPOSE 22 EXPOSE 443 ADD assets/install.sh /opt/install.sh ADD assets/000-default.conf /etc/apache2/sites-available/000-default.conf RUN set -e && a2enmod proxy && a2enmod proxy_http && a2enmod rewrite && chmod 755 /opt/install.sh && ls -l /opt ADD assets/mariadb/initial.sql /docker-entrypoint-initdb.d/initial.sql ADD assets/Handelion.war /usr/local/handelion/wildfly/standalone/deployments/Handelion.war COPY assets/standalone.xml /usr/local/handelion/wildfly/standalone/configuration/ EXPOSE 8180 CMD /opt/install.sh; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf