-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
80 lines (69 loc) · 2.67 KB
/
Dockerfile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ----------------------------------
# Pterodactyl Core Dockerfile
# Environment: Java
# Minimum Panel Version: 0.6.0
# ----------------------------------
FROM alpine AS helper
ARG KEEPUP_VERSION='3.1.1'
RUN wget -nv -q -O keepup https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup \
&& chmod +x keepup
# Install YourKit Java Profiler agents
#RUN wget -q https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2023.9-docker.zip -P /tmp/ && \
# unzip /tmp/YourKit-JavaProfiler-2023.9-docker.zip -d /usr/local && \
FROM container-registry.oracle.com/graalvm/jdk:21-ol9 AS minecraft
LABEL org.opencontainers.image.authors="Offz <offz@mineinabyss.com>"
#RUN dnf install -y ansible-core rclone wget unzip jq openssh attr
RUN microdnf install --refresh -y oracle-epel-release-el9 && \
microdnf install -y git pipx rclone wget unzip jq openssh attr file
COPY --from=helper /keepup /usr/local/bin
ENV\
KEEPUP=true\
KEEPUP_ALLOW_OVERRIDES=true\
ANSIBLE=true\
ANSIBLE_PULL=true\
ANSIBLE_PULL_BRANCH=master\
SERVER_NAME=dev\
HOME=/data\
ANSIBLE_CONFIG=/server-config/ansible.cfg\
LC_ALL=C.UTF-8\
UID=1000\
GID=1000\
CUSTOM_SERVER=server.jar
# Install ansible collections
COPY config/ansible-requirements.yml /opt/ansible/requirements.yml
RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install ansible-core
RUN ansible-galaxy collection install -r /opt/ansible/requirements.yml -p /opt/ansible/collections \
&& rm /opt/ansible/requirements.yml
# Copy over scripts
COPY scripts /scripts
RUN chmod +x /scripts/*
RUN groupadd --gid 1000 minecraft && \
useradd --system --shell /bin/false --uid 1000 -g minecraft --home /data minecraft
WORKDIR $HOME
ENTRYPOINT ["/scripts/entrypoint"]
FROM itzg/bungeecord AS proxy
LABEL org.opencontainers.image.authors="Offz <offz@mineinabyss.com>"
RUN apt-get update -y \
&& apt-get install -y rsync rclone wget unzip git pipx python3-venv jq file
COPY --from=helper /keepup /usr/local/bin
ENV\
KEEPUP=true\
KEEPUP_ALLOW_OVERRIDES=true\
ANSIBLE=true\
ANSIBLE_PULL=true\
ANSIBLE_PULL_BRANCH=master\
SERVER_NAME=dev\
HOME=/server\
TYPE=velocity\
ANSIBLE_CONFIG=/server-config/ansible.cfg
# Install ansible & collections
RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install ansible-core
COPY config/ansible-requirements.yml /opt/ansible/requirements.yml
RUN ansible-galaxy collection install -r /opt/ansible/requirements.yml -p /opt/ansible/collections \
&& rm /opt/ansible/requirements.yml
# Copy over scripts
COPY scripts /scripts
RUN chmod +x /scripts/*
WORKDIR $HOME
RUN cp /usr/bin/run-bungeecord.sh /start
ENTRYPOINT ["/scripts/entrypoint"]