From 8570af75e66c998b8198304986d0c1ddf4507546 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Tue, 11 Apr 2023 02:45:43 +0100 Subject: [PATCH] add nginx php --- .gitea/workflows/publish.yaml | 14 +++++++------- gitea-runner/Java17Dockerfile | 12 ------------ gitea-runner/NginxPHPDockerfile | 4 ++++ 3 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 gitea-runner/Java17Dockerfile create mode 100644 gitea-runner/NginxPHPDockerfile diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 80539f4..1042578 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -49,10 +49,10 @@ jobs: file: ./gitea-runner/Node18xDockerfile tags: git.fascinated.cc/fascinated/gitea-runner:node-18 - # - name: Build and push (Java 17) - # uses: docker/build-push-action@v4 - # with: - # push: true - # context: ./gitea-runner - # file: ./gitea-runner/Java17Dockerfile - # tags: git.fascinated.cc/fascinated/gitea-runner:java-17 + - name: Build and push (Nginx PHP) + uses: docker/build-push-action@v4 + with: + push: true + context: ./gitea-runner + file: ./gitea-runner/NginxPHPDockerfile + tags: git.fascinated.cc/fascinated/nginx-php:latest diff --git a/gitea-runner/Java17Dockerfile b/gitea-runner/Java17Dockerfile deleted file mode 100644 index db5c505..0000000 --- a/gitea-runner/Java17Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM docker:stable - -# Install packages -RUN apk add curl wget git - -# Install Java 17 -RUN apk add java-cacerts - -ENV JAVA_HOME=/opt/openjdk-17 -ENV PATH=/opt/openjdk-17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV JAVA_VERSION=17-ea+14 -RUN /bin/sh -c set -eux; arch="$(apk --print-arch)"; case "$arch" in 'x86_64') downloadUrl='https://download.java.net/java/early_access/alpine/14/binaries/openjdk-17-ea+14_linux-x64-musl_bin.tar.gz'; downloadSha256='f07a1ac921333dafac1cd886ad49600ce143be7efebd32e1a02599a8a0829dd4'; ;; *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; esac; wget -O openjdk.tgz "$downloadUrl"; echo "$downloadSha256 *openjdk.tgz" | sha256sum -c -; mkdir -p "$JAVA_HOME"; tar --extract --file openjdk.tgz --directory "$JAVA_HOME" --strip-components 1 --no-same-owner ; rm openjdk.tgz*; rm -rf "$JAVA_HOME/lib/security/cacerts"; ln -sT /etc/ssl/certs/java/cacerts "$JAVA_HOME/lib/security/cacerts"; java -Xshare:dump; fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; javac --version; java --version \ No newline at end of file diff --git a/gitea-runner/NginxPHPDockerfile b/gitea-runner/NginxPHPDockerfile new file mode 100644 index 0000000..eb5dc7d --- /dev/null +++ b/gitea-runner/NginxPHPDockerfile @@ -0,0 +1,4 @@ +FROM tangramor/nginx-php8-fpm + +# Install GD library +RUN docker-php-ext-install gd \ No newline at end of file