mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
docker: add and use Openj9 as the latest image.
This commit is contained in:
parent
2aeb9cea04
commit
74d6d89b52
2 changed files with 47 additions and 2 deletions
32
.github/workflows/docker-build.yml
vendored
32
.github/workflows/docker-build.yml
vendored
|
@ -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
17
Dockerfile.openj9
Normal 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
|
Loading…
Reference in a new issue