You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
FROM python:3-slim
LABEL maintainer="Drew Short <warrick@sothr.com>"
# Temp directory and volume mount
RUN mkdir -p /tmp /project
# The default expected volume to work with the Ren'Py project
VOLUME /project
# Install required tooling
RUN apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
bzip2 \
ca-certificates \
curl \
faketime \
ffmpeg \
jq \
opus-tools \
procps \
tar \
unzip \
wget \
&& rm -Rf /var/lib/apt/lists/*
# https://github.com/AdoptOpenJDK/openjdk8-binaries/releases
# Install Java 8
ENV JDK_VERSION=${JDK_VERSION:-"8u292"} \
JDK_BUILD=${JDK_BUILD:-"b10"} \
JDK_VM_NAME=${JDK_VM_NAME:-"openj9"} \
JDK_VM_VERSION=${JDK_VM_VERSION:-"0.26.0"} \
JAVA_HOME=${JAVA_HOME:-/opt/java}
RUN cd /tmp \
&& curl -LSo jdk${JDK_VERSION}-${JDK_BUILD}.tgz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk${JDK_VERSION}-${JDK_BUILD}_${JDK_VM_NAME}-${JDK_VM_VERSION}/OpenJDK8U-jdk_x64_linux_${JDK_VM_NAME}_${JDK_VERSION}${JDK_BUILD}_${JDK_VM_NAME}-${JDK_VM_VERSION}.tar.gz \
&& tar -zxf jdk${JDK_VERSION}-${JDK_BUILD}.tgz \
&& mkdir -p ${JAVA_HOME} \
&& mv ./jdk${JDK_VERSION}-${JDK_BUILD}/* "${JAVA_HOME}" \
&& rm -rf "jdk${JDK_VERSION}-${JDK_BUILD}" "${JDK_VERSION}-${JDK_BUILD}.tgz"
# Install RenPy
ARG RENPY_VERSION
ENV RENPY_DIR="/renpy" \
RENPY_VERSION=${RENPY_VERSION:-"7.4.11"}
RUN cd /tmp \
&& curl -LSo renpy-${RENPY_VERSION}-sdk.tar.bz2 https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-sdk.tar.bz2 \
&& curl -LSo renpy-${RENPY_VERSION}-rapt.zip https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-rapt.zip \
&& curl -LSo renpy-${RENPY_VERSION}-web.zip https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-web.zip \
&& tar -xf renpy-${RENPY_VERSION}-sdk.tar.bz2 \
&& rm renpy-${RENPY_VERSION}-sdk.tar.bz2 \
&& mv renpy-${RENPY_VERSION}-sdk ${RENPY_DIR} \
&& unzip renpy-${RENPY_VERSION}-rapt.zip -d ${RENPY_DIR} \
&& rm renpy-${RENPY_VERSION}-rapt.zip \
&& unzip renpy-${RENPY_VERSION}-web.zip -d ${RENPY_DIR} \
&& rm renpy-${RENPY_VERSION}-web.zip
# Export a basic configuration for the build
RUN printf "key.alias=android\nkey.store.password=android\nkey.alias.password=android\nkey.store=${RENPY_DIR}/rapt/android.keystore\nsdk.dir=${ANDROID_SDK_ROOT}\n" > ${RENPY_DIR}/rapt/prototype/local.properties \
&& mkdir -p ${RENPY_DIR}/rapt/project \
&& cp ${RENPY_DIR}/rapt/prototype/local.properties ${RENPY_DIR}/rapt/project/local.properties
# Install the Android SDK for rapt
ENV ANDROID_SDK_VERSION=${ANDROID_SDK_VERSION:-"sdk-tools-linux-4333796"} \
ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT:-"/renpy/rapt/Sdk"} \
ANDROID_HOME=${ANDROID_SDK_ROOT}
RUN cd /tmp \
&& curl -LSo ${ANDROID_SDK_VERSION}.zip https://dl.google.com/android/repository/${ANDROID_SDK_VERSION}.zip \
&& unzip ${ANDROID_SDK_VERSION}.zip -d ./${ANDROID_SDK_VERSION} \
&& mkdir -p ${ANDROID_SDK_ROOT} \
&& mv ./${ANDROID_SDK_VERSION}/* ${ANDROID_SDK_ROOT} \
&& rm -rf ./${ANDROID_SDK_VERSION} ${ANDROID_SDK_VERSION}.zip
# Accept the Android SDK licenses and install the required tooling
RUN cd ${ANDROID_SDK_ROOT} \
&& yes y | tools/bin/sdkmanager --licenses \
&& yes y | tools/bin/sdkmanager "platforms;android-28" \
&& yes y | tools/bin/sdkmanager "build-tools;27.0.3"
# Precache gradle
RUN cd ${RENPY_DIR}/rapt/prototype \
&& ./gradlew --version
ENV PATH="$PATH:${JAVA_HOME:-/opt/java}/bin" \
SDL_AUDIODRIVER="dummy" \
SDL_VIDEODRIVER="dummy"
WORKDIR $RENPY_DIR
|