ftb-docker/Dockerfile

27 lines
712 B
Docker
Raw Permalink Normal View History

2022-11-21 16:33:29 +01:00
ARG BASE_IMAGE
ARG BUILD_IMAGE=ubuntu
FROM ${BUILD_IMAGE} as build
ARG INSTALLER_URL
ARG INSTALLER_CHECKSUM
ARG MODPACK_ID
ARG MODPACK_VERSION
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /server
RUN curl -o installer ${INSTALLER_URL} \
&& echo "${INSTALLER_CHECKSUM} installer" | sha256sum -c \
&& chmod +x installer \
&& ./installer ${MODPACK_ID} ${MODPACK_VERSION} --auto --verbose \
&& rm installer
FROM ${BASE_IMAGE} as final
WORKDIR /server
VOLUME [ "/server" ]
COPY --from=build /server ./
RUN echo "eula=true" > eula.txt
EXPOSE 25565
CMD [ "/bin/bash", "/server/start.sh" ]