diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2696a62..64b1104 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -26,12 +26,10 @@ jobs: dockerfile: Dockerfile target: proxy platforms: linux/amd64 -# - image: ignite -# dockerfile: ignite.Dockerfile -# platforms: linux/amd64 -# - image: momoyo -# dockerfile: momoyo.Dockerfile -# platforms: linux/amd64 + - image: momoyo + dockerfile: Dockerfile + target: momoyo + platforms: linux/amd64,linux/arm64 steps: - uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 83eb492..91a2fe5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,3 +95,64 @@ 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 " +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 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"] diff --git a/ignite.Dockerfile b/ignite.Dockerfile deleted file mode 100644 index 245e705..0000000 --- a/ignite.Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -FROM itzg/minecraft-server:java21-graalvm -LABEL org.opencontainers.image.authors="DoggySazHi " -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 - -ARG KEEPUP_VERSION=2.0.0-beta.2 - -ENV\ - KEEPUP=true\ - KEEPUP_ALLOW_OVERRIDES=true\ - ANSIBLE=true\ - ANSIBLE_PULL=true\ - ANSIBLE_PULL_BRANCH=main\ - UPDATE_DATA_OWNER=true\ - SERVER_NAME=dev\ - ANSIBLE_HOME=/data\ - USE_IGNITE_LOADER=true - -WORKDIR /opt/minecraft - -# Install keepup -RUN wget -nv -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-shadow-${KEEPUP_VERSION}.zip \ - # unzip file inside hocon-to-json.zip into /usr/local \ - && unzip -q keepup.zip \ - && rclone copy keepup-shadow-${KEEPUP_VERSION}/ /usr/local \ - && chmod +x /usr/local/bin/keepup \ - && rm -rf keepup.zip keepup-shadow-${KEEPUP_VERSION} - -# 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"] diff --git a/momoyo.Dockerfile b/momoyo.Dockerfile deleted file mode 100644 index f6edc69..0000000 --- a/momoyo.Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM itzg/minecraft-server:java21-alpine -LABEL org.opencontainers.image.authors="yumio " -LABEL org.opencontainers.image.version="v1.2" - -RUN apk add --no-cache ansible-core rclone wget unzip jq openssh - -ARG KEEPUP_VERSION=2.0.1 - -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\ - ANSIBLE_CONFIG=/server-config/ansible.cfg - -WORKDIR /opt/minecraft - -# Install keepup -RUN wget -nv -q -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-shadow-${KEEPUP_VERSION}.zip \ - # unzip file inside hocon-to-json.zip into /usr/local \ - && unzip -q keepup.zip \ - && rclone copy keepup-shadow-${KEEPUP_VERSION}/ /usr/local \ - && chmod +x /usr/local/bin/keepup \ - && rm -rf keepup.zip keepup-shadow-${KEEPUP_VERSION} - -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/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"]