Skip to content

Instantly share code, notes, and snippets.

@edvaldoszy
Last active December 10, 2019 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edvaldoszy/bb565fb9f8eb0507fbf902e11ed77669 to your computer and use it in GitHub Desktop.
Save edvaldoszy/bb565fb9f8eb0507fbf902e11ed77669 to your computer and use it in GitHub Desktop.
Docker React Native Android
FROM openjdk:8-jdk
ENV ANDROID_COMPILE_SDK="28"
ENV ANDROID_BUILD_TOOLS="28.0.3"
ENV ANDROID_SDK_TOOLS="4333796"
ENV ANDROID_HOME="${PWD}/android-sdk-linux"
ENV PATH="${PATH}:${PWD}/android-sdk-linux/platform-tools/"
RUN apt update -qy; \
apt install -qy curl unzip; \
curl -sS -o android-sdk-linux.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip; \
unzip -d android-sdk-linux android-sdk-linux.zip; rm android-sdk-linux.zip; \
echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}"; \
echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools"; \
echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}"; \
yes | android-sdk-linux/tools/bin/sdkmanager --licenses; \
apt remove -qy curl unzip; apt autoremove -qy
# RUN curl -sS https://nodejs.org/dist/v11.10.1/node-v11.10.1-linux-x64.tar.xz | tar -Jxf -
# ENV NODE_VERSION="11.10.1"
# ENV FILE_NAME="node-v${NODE_VERSION}-linux-x64"
# # ENV PATH="${PATH}:${PWD}/node-v${FILE_NAME}/bin"
# RUN wget --quiet "https://nodejs.org/dist/v11.10.1/${FILE_NAME}.tar.xz" \
# && tar -Jxf "${FILE_NAME}.tar.xz" \
# && rm "${FILE_NAME}.tar.xz" \
# && ln -s "/${FILE_NAME}/bin/node" "/usr/local/bin/node"
# https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
# curl -o- -L https://yarnpkg.com/install.sh | bash
# https://yarnpkg.com/en/docs/install#alternatives-stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment