Advertisement
Guest User

godot-ci-nodejs

a guest
May 21st, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | Source Code | 0 0
  1. FROM node:20-bullseye
  2. LABEL author="https://github.com/aBARICHELLO/godot-ci/graphs/contributors"
  3.  
  4. USER root
  5. ENV DEBIAN_FRONTEND=noninteractive
  6. RUN apt-get update && apt-get install -y --no-install-recommends \
  7. ca-certificates \
  8. git \
  9. git-lfs \
  10. unzip \
  11. wget \
  12. zip \
  13. adb \
  14. openjdk-17-jdk-headless \
  15. rsync \
  16. && rm -rf /var/lib/apt/lists/*
  17.  
  18. ARG GODOT_VERSION="4.2.1"
  19. ARG RELEASE_NAME="stable"
  20. ARG SUBDIR=""
  21. ARG GODOT_TEST_ARGS=""
  22. ARG GODOT_PLATFORM="linux.x86_64"
  23.  
  24. RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
  25. && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
  26. && mkdir ~/.cache \
  27. && mkdir -p ~/.config/godot \
  28. && mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
  29. && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
  30. && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM} /usr/local/bin/godot \
  31. && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
  32. && mv templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
  33. && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip
  34.  
  35. ADD getbutler.sh /opt/butler/getbutler.sh
  36. RUN bash /opt/butler/getbutler.sh
  37. RUN /opt/butler/bin/butler -V
  38.  
  39. ENV PATH="/opt/butler/bin:${PATH}"
  40.  
  41. # Download and setup android-sdk
  42. ENV ANDROID_HOME="/usr/lib/android-sdk"
  43. RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \
  44. && unzip commandlinetools-linux-*_latest.zip -d cmdline-tools \
  45. && mv cmdline-tools $ANDROID_HOME/ \
  46. && rm -f commandlinetools-linux-*_latest.zip
  47.  
  48. ENV PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}"
  49.  
  50. RUN yes | sdkmanager --licenses \
  51. && sdkmanager "platform-tools" "build-tools;33.0.2" "platforms;android-33" "cmdline-tools;latest" "cmake;3.22.1" "ndk;25.2.9519653"
  52.  
  53. # Adding android keystore and settings
  54. RUN keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 \
  55. && mv debug.keystore /root/debug.keystore
  56.  
  57. RUN godot -v -e --quit --headless ${GODOT_TEST_ARGS}
  58. RUN echo 'export/android/android_sdk_path = "/usr/lib/android-sdk"' >> ~/.config/godot/editor_settings-4.tres
  59. RUN echo 'export/android/debug_keystore = "/root/debug.keystore"' >> ~/.config/godot/editor_settings-4.tres
  60. RUN echo 'export/android/debug_keystore_user = "androiddebugkey"' >> ~/.config/godot/editor_settings-4.tres
  61. RUN echo 'export/android/debug_keystore_pass = "android"' >> ~/.config/godot/editor_settings-4.tres
  62. RUN echo 'export/android/force_system_user = false' >> ~/.config/godot/editor_settings-4.tres
  63. RUN echo 'export/android/timestamping_authority_url = ""' >> ~/.config/godot/editor_settings-4.tres
  64. RUN echo 'export/android/shutdown_adb_on_exit = true' >> ~/.config/godot/editor_settings-4.tres
Tags: Dockerfile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement