-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
FROM dockcenter/velocity:stable | ||
FROM eclipse-temurin:17-jdk-alpine | ||
|
||
EXPOSE 25577 | ||
|
||
|
||
ENV JAVA_MEMORY="512M" | ||
ENV JAVA_FLAGS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch" | ||
|
||
WORKDIR /data | ||
|
||
RUN apk add --upgrade --no-cache openssl && \ | ||
addgroup -S velocity && \ | ||
adduser -S velocity -G velocity && \ | ||
chown velocity:velocity /data | ||
|
||
USER velocity | ||
|
||
VOLUME /data | ||
|
||
EXPOSE 25577 | ||
|
||
RUN wget https://api.papermc.io/v2/projects/velocity/versions/3.2.0-SNAPSHOT/builds/294/downloads/velocity-3.2.0-SNAPSHOT-294.jar | ||
RUN mv velocity-*.jar /opt/velocity/velocity.jar | ||
|
||
RUN wget https://github.com/Aelysium-Group/rusty-connector/releases/download/v0.7.0/rusty-connector-0.7.0.jar | ||
RUN mkdir /data/plugins | ||
RUN mv rusty-connector-*.jar /data/plugins/rusty-connector.jar | ||
COPY velocity.toml /data | ||
COPY --chown=velocity:velocity velocity_config /data/plugins/rustyconnector-velocity/ | ||
RUN ln -s /mnt/secrets/private.key /data/plugins/rustyconnector-velocity/private.key | ||
RUN ln -s /mnt/secrets/private.key /data/plugins/rustyconnector-velocity/private.key | ||
|
||
ENTRYPOINT java -Xms$JAVA_MEMORY -Xmx$JAVA_MEMORY $JAVA_FLAGS -jar /opt/velocity/velocity.jar |