From 2e56c4a377a7e3b926118aab1211f899168c6a6f Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 29 Nov 2023 22:33:27 +0000 Subject: [PATCH] fix firefox --- .gitea/workflows/java.yml | 15 ++++-------- {generic/java => java}/8/Dockerfile | 0 java/8_with_firefox/Dockerfile | 35 ++++++++++++++++++++++++++++ {generic/java => java}/entrypoint.sh | 0 java8-with-firefox/Dockerfile | 5 ---- 5 files changed, 39 insertions(+), 16 deletions(-) rename {generic/java => java}/8/Dockerfile (100%) create mode 100644 java/8_with_firefox/Dockerfile rename {generic/java => java}/entrypoint.sh (100%) delete mode 100644 java8-with-firefox/Dockerfile diff --git a/.gitea/workflows/java.yml b/.gitea/workflows/java.yml index 5e1fc4a..fb406b7 100644 --- a/.gitea/workflows/java.yml +++ b/.gitea/workflows/java.yml @@ -7,7 +7,7 @@ on: branches: - master paths: - - generic/java/** + - java/** - .gitea/workflows/java.yml jobs: push: @@ -18,6 +18,7 @@ jobs: matrix: tag: - 8 + - 8_with_firefox steps: - name: Checkout uses: actions/checkout@v3 @@ -48,16 +49,8 @@ jobs: - uses: docker/build-push-action@v5 with: - context: ./generic/java - file: ./generic/java/${{ matrix.tag }}/Dockerfile + context: ./java + file: ./java/${{ matrix.tag }}/Dockerfile push: true tags: | fascinated/docker-images:java_${{ matrix.tag }} - - - name: Build and Push (Java 8 - With Firefox) - uses: docker/build-push-action@v4 - with: - push: true - context: ./java8-with-firefox - file: ./java8-with-firefox/Dockerfile - tags: fascinated/docker-images:java_8_firefox diff --git a/generic/java/8/Dockerfile b/java/8/Dockerfile similarity index 100% rename from generic/java/8/Dockerfile rename to java/8/Dockerfile diff --git a/java/8_with_firefox/Dockerfile b/java/8_with_firefox/Dockerfile new file mode 100644 index 0000000..71d35be --- /dev/null +++ b/java/8_with_firefox/Dockerfile @@ -0,0 +1,35 @@ +# Latest Ubuntu image +FROM eclipse-temurin:8u392-b08-jdk-focal + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + firefox + +# Fix for Firefox? +ENV DISPLAY=:0 + +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/generic/java/entrypoint.sh b/java/entrypoint.sh similarity index 100% rename from generic/java/entrypoint.sh rename to java/entrypoint.sh diff --git a/java8-with-firefox/Dockerfile b/java8-with-firefox/Dockerfile deleted file mode 100644 index 00a8873..0000000 --- a/java8-with-firefox/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM fascinated/docker-images:java-8 - -RUN apt update firefox -y - -ENV DISPLAY=:0 \ No newline at end of file