docker: add and use Openj9 as the latest image.

This commit is contained in:
FireMasterK 2021-02-09 15:46:22 +05:30
parent 2aeb9cea04
commit 74d6d89b52
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58
2 changed files with 47 additions and 2 deletions

View File

@ -8,7 +8,7 @@ on:
- master
jobs:
build-docker:
build-docker-hotspot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -35,4 +35,32 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: 1337kavin/piped:latest
tags: 1337kavin/piped:hotspot
build-docker-openj9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.openj9
platforms: linux/amd64
push: true
tags: 1337kavin/piped:latest,1337kavin/piped:openj9

17
Dockerfile.openj9 Normal file
View File

@ -0,0 +1,17 @@
FROM adoptopenjdk/openjdk11-openj9:slim AS build
WORKDIR /app/
COPY . /app/
RUN chmod +x ./gradlew && ./gradlew shadowJar
FROM adoptopenjdk/openjdk11-openj9:jre
WORKDIR /app/
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
EXPOSE 8080
CMD java -jar /app/piped.jar