dockercraft/Dockerfile
Jeremy McClure cff62979ff
All checks were successful
Docker Build and Push / build (push) Successful in 1m6s
change Eula handling, disable server start
2025-03-29 06:11:18 -04:00

39 lines
868 B
Docker

FROM ubuntu:noble
ARG UID=1000
ARG GID=1000
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
jq \
libxml2-utils \
sudo \
tini && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Remove default ubuntu user
RUN userdel -r ubuntu && \
useradd --create-home -u 1000 minecraft && \
echo 'minecraft ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
mkdir -p /data && \
chown -R ${UID}:${GID} /data
RUN su -c "curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash && . ~/.jabba/jabba.sh" minecraft
COPY ./scripts/init /
COPY ./scripts/mc /usr/local/bin
RUN chmod +x /init && chmod +x /usr/local/bin/mc
USER minecraft
ENTRYPOINT ["tini", "--", "/init"]