-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
158 lines (118 loc) · 4.62 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
FROM alpine AS helper
ARG KEEPUP_VERSION='3.1.2'
RUN wget -nv -q -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-${KEEPUP_VERSION}.zip \
# unzip file inside hocon-to-json.zip into /usr/local \
&& unzip -q keepup.zip \
&& mv keepup-${KEEPUP_VERSION}/ keepup
FROM itzg/minecraft-server:java21-graalvm AS minecraft
LABEL org.opencontainers.image.authors="yumio <[email protected]>; DoggySazHi <[email protected]>"
LABEL org.opencontainers.image.version="v0.0.2"
RUN dnf reinstall glibc-common -yq
RUN dnf install glibc-langpack-en glibc-locale-source rclone wget unzip jq python3-pip -yq
# ansible ansible-collection-community-general ansible-collection-ansible-posix might be out of date? Use pip
# CHAT WE'RE INSTALLING RUST??
# Install Rust for Ansible
RUN dnf install cmake gcc make curl clang openssl-devel python3-devel -yq
RUN dnf module install python39 -yq
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Actually install Ansible
RUN python3.9 -m pip install --user setuptools-rust
RUN python3.9 -m pip install --user ansible
ENV PATH="/root/.local/bin:${PATH}"
# Should be already up-to-date
# RUN ansible-galaxy collection install community.general
# RUN ansible-galaxy collection install ansible.posix
# Clean up build dependencies
RUN dnf remove cmake gcc make clang openssl-devel python3-devel -yq
# Set locale
RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
ENV LANG en_US.UTF-8
COPY --from=helper /keepup /usr/local
ENV\
KEEPUP=true\
KEEPUP_ALLOW_OVERRIDES=true\
ANSIBLE=true\
ANSIBLE_PULL=true\
ANSIBLE_PULL_BRANCH=master\
UPDATE_DATA_OWNER=true\
SERVER_NAME=dev\
ANSIBLE_HOME=/data
# Copy over scripts
COPY scripts/dev /scripts/dev
RUN chmod +x /scripts/dev/*
RUN dos2unix /scripts/dev/*
# Symlink for rclone after Ansible
RUN mkdir -p ~/.config/rclone
RUN ln -s /data/.config/rclone/rclone.conf ~/.config/rclone/rclone.conf
WORKDIR /data
ENTRYPOINT ["/scripts/dev/entrypoint"]
FROM itzg/bungeecord AS proxy
LABEL org.opencontainers.image.authors="yumio <[email protected]>"
LABEL org.opencontainers.image.version="v0.0.1"
RUN apt-get update -y \
&& apt-get install -y rsync rclone wget unzip git pipx python3-venv jq file
RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --include-deps ansible
COPY --from=helper /keepup /usr/local
ENV\
KEEPUP=true\
KEEPUP_ALLOW_OVERRIDES=true\
ANSIBLE=true\
ANSIBLE_PULL=true\
ANSIBLE_PULL_BRANCH=master\
UPDATE_DATA_OWNER=true\
SERVER_NAME=dev\
ANSIBLE_HOME=/server
# Copy over scripts
COPY scripts/dev /scripts/dev
RUN chmod +x /scripts/dev/*
WORKDIR /server
RUN cp /usr/bin/run-bungeecord.sh /start
ENTRYPOINT ["/scripts/dev/workaround"]
FROM itzg/minecraft-server:java21-graalvm AS momoyo
LABEL org.opencontainers.image.authors="yumio <[email protected]>"
LABEL org.opencontainers.image.version="v1.0.0"
RUN dnf reinstall glibc-common -yq
RUN dnf install glibc-langpack-en glibc-locale-source rclone wget unzip jq attr file python3-pip -yq
# ansible ansible-collection-community-general ansible-collection-ansible-posix might be out of date? Use pip
# CHAT WE'RE INSTALLING RUST??
# Install Rust for Ansible
RUN dnf install cmake gcc make curl clang openssl-devel python3-devel -yq
RUN dnf module install python39 -yq
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Actually install Ansible
RUN python3.9 -m pip install --user setuptools-rust
RUN python3.9 -m pip install --user ansible
ENV PATH="/root/.local/bin:${PATH}"
# Should be already up-to-date
# RUN ansible-galaxy collection install community.general
# RUN ansible-galaxy collection install ansible.posix
# Clean up build dependencies
RUN dnf remove cmake gcc make clang openssl-devel python3-devel -yq
# Set locale
RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
ENV LANG en_US.UTF-8
COPY --from=helper /keepup /usr/local
ENV\
KEEPUP=false\
KEEPUP_ALLOW_OVERRIDES=true\
ANSIBLE=true\
ANSIBLE_PULL=true\
ANSIBLE_PULL_BRANCH=master\
UPDATE_DATA_OWNER=true\
SERVER_NAME=dev\
ANSIBLE_HOME=/data
# Copy over scripts
COPY scripts/dev /scripts/dev
RUN chmod +x /scripts/dev/*
RUN dos2unix /scripts/dev/*
# Symlink for rclone after Ansible
RUN mkdir -p ~/.config/rclone
RUN ln -s /data/.config/rclone/rclone.conf ~/.config/rclone/rclone.conf
WORKDIR /data
ENTRYPOINT ["/scripts/dev/entrypoint"]