mirror of
https://github.com/weidaoli/betterenderchests.git
synced 2026-04-01 03:42:32 +08:00
Initial commit: Better Ender Chests mod for NeoForge 1.21.1
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache curl unzip
|
||||
|
||||
# Copy project files
|
||||
COPY gradle.properties settings.gradle build.gradle ./
|
||||
COPY src ./src
|
||||
|
||||
# Download and setup Gradle
|
||||
RUN curl -L -o gradle.zip https://services.gradle.org/distributions/gradle-8.10-bin.zip && \
|
||||
unzip -q gradle.zip && \
|
||||
rm gradle.zip && \
|
||||
mv gradle-8.10 gradle
|
||||
|
||||
# Create empty gradle home to avoid permission issues
|
||||
RUN mkdir -p /root/.gradle
|
||||
|
||||
# Build the mod
|
||||
RUN ./gradle/bin/gradle build --no-daemon -x test || (cat /app/build/reports/problems/problems-report.html 2>/dev/null && exit 1)
|
||||
|
||||
# Output stage - copy artifacts
|
||||
FROM alpine:latest
|
||||
WORKDIR /output
|
||||
COPY --from=builder /app/build/libs/*.jar ./
|
||||
CMD ["ls", "-la", "/output/"]
|
||||
Reference in New Issue
Block a user