-
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
6 changed files
with
129 additions
and
4 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Java - GraalVM LazyMC Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- Java/** | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- Java/** | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.name }} | ||
uses: ./.github/workflows/docker-build.yml | ||
with: | ||
build_name: ${{ matrix.name }} | ||
build_path: ${{ matrix.path }} | ||
ocr_login: true | ||
secrets: | ||
ocr_username: ${{ secrets.OCR_USERNAME }} | ||
ocr_password: ${{ secrets.OCR_PASSWORD }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- name: "graalvm_lz_java_8" | ||
path: "Java/GraalVM-LZ/8" | ||
- name: "graalvm_lz_java_11" | ||
path: "Java/GraalVM-LZ/11" | ||
- name: "graalvm_lz_java_17" | ||
path: "Java/GraalVM-LZ/17" |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM busybox as tools | ||
|
||
FROM rust:buster as lazymc | ||
|
||
WORKDIR /lazymc | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git && \ | ||
git clone https://github.com/Docker-Collection/lazymc.git . && \ | ||
cargo build --release && \ | ||
chmod +x target/release/lazymc | ||
|
||
FROM container-registry.oracle.com/graalvm/jdk-ee:ol9-java11-22 | ||
|
||
RUN useradd -d /home/container -m container | ||
|
||
USER container | ||
ENV USER=container HOME=/home/container | ||
WORKDIR /home/container | ||
|
||
COPY --from=tools /bin/ip /bin/ | ||
COPY --from=lazymc /lazymc/target/release/lazymc /bin/lazymc | ||
COPY entrypoint.sh /entrypoint.sh | ||
CMD [ "/bin/bash", "/entrypoint.sh" ] |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM busybox as tools | ||
|
||
FROM rust:buster as lazymc | ||
|
||
WORKDIR /lazymc | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git && \ | ||
git clone https://github.com/Docker-Collection/lazymc.git . && \ | ||
cargo build --release && \ | ||
chmod +x target/release/lazymc | ||
|
||
FROM container-registry.oracle.com/graalvm/jdk-ee:ol9-java17-22 | ||
|
||
RUN useradd -d /home/container -m container | ||
|
||
USER container | ||
ENV USER=container HOME=/home/container | ||
WORKDIR /home/container | ||
|
||
COPY --from=tools /bin/ip /bin/ | ||
COPY --from=lazymc /lazymc/target/release/lazymc /bin/lazymc | ||
COPY entrypoint.sh /entrypoint.sh | ||
CMD [ "/bin/bash", "/entrypoint.sh" ] |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM busybox as tools | ||
|
||
FROM rust:buster as lazymc | ||
|
||
WORKDIR /lazymc | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git && \ | ||
git clone https://github.com/Docker-Collection/lazymc.git . && \ | ||
cargo build --release && \ | ||
chmod +x target/release/lazymc | ||
|
||
FROM container-registry.oracle.com/graalvm/jdk-ee:ol9-java8-21 | ||
|
||
RUN useradd -d /home/container -m container | ||
|
||
USER container | ||
ENV USER=container HOME=/home/container | ||
WORKDIR /home/container | ||
|
||
COPY --from=tools /bin/ip /bin/ | ||
COPY --from=lazymc /lazymc/target/release/lazymc /bin/lazymc | ||
COPY entrypoint.sh /entrypoint.sh | ||
CMD [ "/bin/bash", "/entrypoint.sh" ] |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
TZ=${TZ:-UTC} | ||
export TZ | ||
|
||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-0);exit}') | ||
export INTERNAL_IP | ||
|
||
cd /home/container || exit 1 | ||
|
||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mjava -version\n" | ||
java -version | ||
|
||
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)") | ||
|
||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" | ||
exec env ${PARSED} |