mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
add docker files
This commit is contained in:
parent
3092ec4b27
commit
f7ff7afcf9
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.*
|
||||||
|
build
|
||||||
|
bin
|
||||||
|
Dockerfile
|
||||||
|
*.bat
|
||||||
|
LICENSE
|
||||||
|
*.md
|
||||||
|
config.properties
|
38
.github/workflows/docker-build.yml
vendored
Normal file
38
.github/workflows/docker-build.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Docker Multi-Architecture Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
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
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: 1337kavin/piped:latest
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,12 +5,14 @@ bin/
|
|||||||
.*
|
.*
|
||||||
|
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
!.dockerignore
|
||||||
|
|
||||||
|
!.github/
|
||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
### Gradle ###
|
### Gradle ###
|
||||||
/.gradle
|
|
||||||
/build/
|
/build/
|
||||||
|
|
||||||
# TxT File
|
# TxT File
|
||||||
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM adoptopenjdk/openjdk11:jdk11u-ubi-nightly-slim AS build
|
||||||
|
|
||||||
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY . /app/
|
||||||
|
|
||||||
|
RUN chmod +x ./gradlew && ./gradlew shadowJar
|
||||||
|
|
||||||
|
FROM adoptopenjdk/openjdk11:ubi-minimal-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…
x
Reference in New Issue
Block a user