diff --git a/.gitignore b/.gitignore index 6185788..43cb8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ __pycache__/ build/ dist/ +docker/data/ *.egg-info/ node_modules/ diff --git a/README.md b/README.md index 9973f20..2f2bb42 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ Oracle Java image yourself: ``` 2. Visit [the Java download page](https://www.java.com/en/download/manual.jsp) and get the *Linux x64* tar archive of - Oracle Java version `8u251`. Save it to the `docker` subdirectory of the previously cloned repository as + Oracle Java version `8u251`. Save it to the `docker/data` subdirectory of the previously cloned repository as `jre-8u251-linux-x64.tar.gz`. If you would like to also use Oracle Java 7, get `jre-7u80-linux-x64.tar.gz` from [Oracle's Java archive](https://www.oracle.com/java/technologies/javase/javase7-archive-downloads.html) (this requires an free Oracle account). diff --git a/docker/Dockerfile_html5 b/docker/Dockerfile_html5 index 250f61b..3018012 100644 --- a/docker/Dockerfile_html5 +++ b/docker/Dockerfile_html5 @@ -1,6 +1,14 @@ FROM node:14 LABEL maintainer="Maximilian Heuwes " +# Set packages from deb.debian.com to archive.debian.com +COPY ./config/buster-sources.list /etc/apt/sources.list +RUN apt-get update && \ + apt-get install -y wget && \ + wget -O /tmp/debian-keyring.deb http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb && \ + dpkg -i /tmp/debian-keyring.deb && \ + rm /tmp/debian-keyring.deb + RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl net-tools procps python-numpy \ python-pip python-pyquery python-setuptools python-wheel tar && \ diff --git a/docker/Dockerfile_openjdk-7 b/docker/Dockerfile_openjdk-7 index 94e20cd..acccd48 100644 --- a/docker/Dockerfile_openjdk-7 +++ b/docker/Dockerfile_openjdk-7 @@ -1,9 +1,16 @@ FROM debian:jessie LABEL maintainer="Ingo Meyer " -# Install needed packages and Java dependencies (second `apt-get install` call) +# Set packages from deb.debian.com to archive.debian.com +COPY ./config/jessie-sources.list /etc/apt/sources.list RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ + apt-get install -y wget && \ + wget -O /tmp/debian-keyring.deb http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb && \ + dpkg -i /tmp/debian-keyring.deb && \ + rm /tmp/debian-keyring.deb + +# Install needed packages and Java dependencies (second `apt-get install` call) +RUN apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ python-pip python-pyquery python-wheel supervisor tar x11vnc xvfb && \ apt-get install -y --no-install-recommends ca-certificates-java initscripts java-common libasound2 \ libatk-wrapper-java-jni libatk1.0-0 libc6 libcairo2 libcups2 \ @@ -60,7 +67,7 @@ COPY supervisord_openjdk-7.conf /etc/supervisor/conf.d/supervisord.conf WORKDIR /root/ -ENV DISPLAY :0 +ENV DISPLAY=:0 EXPOSE 8080 ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] diff --git a/docker/Dockerfile_openjdk-8 b/docker/Dockerfile_openjdk-8 index a64e88a..675a08f 100644 --- a/docker/Dockerfile_openjdk-8 +++ b/docker/Dockerfile_openjdk-8 @@ -1,9 +1,16 @@ FROM debian:stretch LABEL maintainer="Ingo Meyer " -# Install needed packages and Java dependencies (second `apt-get install` call) +# Set packages from deb.debian.com to archive.debian.com +COPY ./config/stretch-sources.list /etc/apt/sources.list RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ + apt-get install -y wget && \ + wget -O /tmp/debian-keyring.deb http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb && \ + dpkg -i /tmp/debian-keyring.deb && \ + rm /tmp/debian-keyring.deb + +# Install needed packages and Java dependencies (second `apt-get install` call) +RUN apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ python-pip python-pyquery python-setuptools python-wheel supervisor tar \ x11vnc xvfb && \ apt-get install -y --no-install-recommends adwaita-icon-theme ca-certificates ca-certificates-java \ @@ -76,7 +83,7 @@ COPY supervisord_openjdk-8.conf /etc/supervisor/conf.d/supervisord.conf WORKDIR /root/ -ENV DISPLAY :0 +ENV DISPLAY=:0 EXPOSE 8080 ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] diff --git a/docker/Dockerfile_oraclejre-7 b/docker/Dockerfile_oraclejre-7 index 77a602b..05f25ff 100644 --- a/docker/Dockerfile_oraclejre-7 +++ b/docker/Dockerfile_oraclejre-7 @@ -1,9 +1,16 @@ FROM debian:stretch LABEL maintainer="Ingo Meyer " -# Install needed packages and Java dependencies (second `apt-get install` call) +# Set packages from deb.debian.com to archive.debian.com +COPY ./config/stretch-sources.list /etc/apt/sources.list RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ + apt-get install -y wget && \ + wget -O /tmp/debian-keyring.deb http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb && \ + dpkg -i /tmp/debian-keyring.deb && \ + rm /tmp/debian-keyring.deb + +# Install needed packages and Java dependencies (second `apt-get install` call) +RUN apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ python-pip python-pyquery python-setuptools python-wheel supervisor tar \ x11vnc xvfb && \ apt-get install -y --no-install-recommends adwaita-icon-theme ca-certificates ca-certificates-java \ @@ -49,7 +56,7 @@ RUN NOVNC_VERSION="1.1.0" && \ ln -s "/opt/noVNC-${NOVNC_VERSION}/utils/launch.sh" /usr/local/bin/launch_novnc && \ rm -f /tmp/novnc.tar.gz -COPY jre-7u80-linux-x64.tar.gz /opt/java_packages/7u80/jre-7u80-linux-x64.tar.gz +COPY data/jre-7u80-linux-x64.tar.gz /opt/java_packages/7u80/jre-7u80-linux-x64.tar.gz COPY entrypoint.sh /usr/local/bin/docker-entrypoint COPY get_java_viewer.py /usr/local/bin/get_java_viewer @@ -58,7 +65,7 @@ COPY supervisord_oraclejre-7.conf /etc/supervisor/conf.d/supervisord.conf WORKDIR /root/ -ENV DISPLAY :0 +ENV DISPLAY=:0 EXPOSE 8080 ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] diff --git a/docker/Dockerfile_oraclejre-8 b/docker/Dockerfile_oraclejre-8 index 71268aa..a95ff10 100644 --- a/docker/Dockerfile_oraclejre-8 +++ b/docker/Dockerfile_oraclejre-8 @@ -1,9 +1,16 @@ FROM debian:stretch LABEL maintainer="Ingo Meyer " -# Install needed packages and Java dependencies (second `apt-get install` call) +# Set packages from deb.debian.com to archive.debian.com +COPY ./config/stretch-sources.list /etc/apt/sources.list RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ + apt-get install -y wget && \ + wget -O /tmp/debian-keyring.deb http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb && \ + dpkg -i /tmp/debian-keyring.deb && \ + rm /tmp/debian-keyring.deb + +# Install needed packages and Java dependencies (second `apt-get install` call) +RUN apt-get install -y --no-install-recommends ca-certificates curl eterm fluxbox net-tools procps python-numpy \ python-pip python-pyquery python-setuptools python-wheel supervisor tar \ x11vnc xvfb && \ apt-get install -y --no-install-recommends adwaita-icon-theme ca-certificates ca-certificates-java \ @@ -49,7 +56,7 @@ RUN NOVNC_VERSION="1.1.0" && \ ln -s "/opt/noVNC-${NOVNC_VERSION}/utils/launch.sh" /usr/local/bin/launch_novnc && \ rm -f /tmp/novnc.tar.gz -COPY jre-8u251-linux-x64.tar.gz /opt/java_packages/8u251/jre-8u251-linux-x64.tar.gz +COPY data/jre-8u251-linux-x64.tar.gz /opt/java_packages/8u251/jre-8u251-linux-x64.tar.gz COPY entrypoint.sh /usr/local/bin/docker-entrypoint COPY get_java_viewer.py /usr/local/bin/get_java_viewer @@ -58,7 +65,7 @@ COPY supervisord_oraclejre-8.conf /etc/supervisor/conf.d/supervisord.conf WORKDIR /root/ -ENV DISPLAY :0 +ENV DISPLAY=:0 EXPOSE 8080 ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] diff --git a/docker/Makefile b/docker/Makefile index 528082d..98db335 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -15,18 +15,19 @@ build-openjdk: done build-oracle: - @if [[ -f "jre-7u80-linux-x64.tar.gz" ]]; then \ + @if [ -f "data/jre-7u80-linux-x64.tar.gz" ]; then \ docker build -t "sciapp/nojava-ipmi-kvm:latest-oraclejre-7" -f "Dockerfile_oraclejre-7" .; \ - if [[ "$$(git symbolic-ref -q HEAD)" == "refs/heads/master" ]]; then \ + if [ "$$(git symbolic-ref -q HEAD)" = "refs/heads/main" ]; then \ docker tag "sciapp/nojava-ipmi-kvm:latest-oraclejre-7" \ "sciapp/nojava-ipmi-kvm:v$(PACKAGE_VERSION)-oraclejre-7"; \ fi; \ else \ >&2 echo "Please download \"jre-7u80-linux-x64.tar.gz\" to build an Oracle Java 7 docker image."; \ - fi; \ - if [[ -f "jre-8u251-linux-x64.tar.gz" ]]; then \ + fi; + + @if [ -f "data/jre-8u251-linux-x64.tar.gz" ]; then \ docker build -t "sciapp/nojava-ipmi-kvm:latest-oraclejre-8" -f "Dockerfile_oraclejre-8" .; \ - if [[ "$$(git symbolic-ref -q HEAD)" == "refs/heads/master" ]]; then \ + if [ "$$(git symbolic-ref -q HEAD)" = "refs/heads/master" ]; then \ docker tag "sciapp/nojava-ipmi-kvm:latest-oraclejre-8" \ "sciapp/nojava-ipmi-kvm:v$(PACKAGE_VERSION)-oraclejre-8"; \ fi; \ diff --git a/docker/config/buster-sources.list b/docker/config/buster-sources.list new file mode 100644 index 0000000..52fc13b --- /dev/null +++ b/docker/config/buster-sources.list @@ -0,0 +1,2 @@ +deb [trusted=yes] http://archive.debian.org/debian buster main +deb [trusted=yes] http://archive.debian.org/debian-security buster/updates main diff --git a/docker/config/jessie-sources.list b/docker/config/jessie-sources.list new file mode 100644 index 0000000..785de9b --- /dev/null +++ b/docker/config/jessie-sources.list @@ -0,0 +1,2 @@ +deb [trusted=yes] http://archive.debian.org/debian jessie main +deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main diff --git a/docker/config/stretch-sources.list b/docker/config/stretch-sources.list new file mode 100644 index 0000000..9ae3d3d --- /dev/null +++ b/docker/config/stretch-sources.list @@ -0,0 +1,2 @@ +deb [trusted=yes] http://archive.debian.org/debian stretch main +deb [trusted=yes] http://archive.debian.org/debian-security stretch/updates main diff --git a/docker/data/.gitkeep b/docker/data/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docker/data/.gitkeep @@ -0,0 +1 @@ +