-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
28 lines (21 loc) · 632 Bytes
/
dockerfile
File metadata and controls
28 lines (21 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use an official AdoptOpenJDK image as the base image
FROM openjdk:23-jdk
# Labels
LABEL org.opencontainers.image.source=https://github.com/sems/minecraft-paper-server/
# Set environment variables
ENV MEMORY=2G
ENV OP_USERNAME=""
ENV OP_UUID=""
# Set the working directory
WORKDIR /minecraft
# Copy the entrypoint script
COPY entrypoint.sh /minecraft/entrypoint.sh
RUN chmod +x /minecraft/entrypoint.sh
# Create plugins directory and copy JAR files
RUN mkdir -p /minecraft/plugins
COPY plugins/*.jar /minecraft/plugins/
# Expose necessary ports
EXPOSE 25565
EXPOSE 8123
# Entrypoint command
CMD ["/minecraft/entrypoint.sh"]