You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
5 years ago
|
# This is a Dockerfile for creating a build environment for
|
||
|
# tailscale-android.
|
||
5 years ago
|
|
||
1 year ago
|
FROM --platform=linux/amd64 eclipse-temurin:20-jdk
|
||
5 years ago
|
|
||
|
# To enable running android tools such as aapt
|
||
|
RUN apt-get update && apt-get -y upgrade
|
||
2 years ago
|
RUN apt-get install -y libz1 libstdc++6 unzip
|
||
5 years ago
|
# For Go:
|
||
|
RUN apt-get -y --no-install-recommends install curl gcc
|
||
|
RUN apt-get -y --no-install-recommends install ca-certificates libc6-dev git
|
||
|
|
||
5 years ago
|
RUN apt-get -y install make
|
||
|
|
||
1 year ago
|
RUN mkdir -p build
|
||
5 years ago
|
ENV HOME /build
|
||
|
|
||
1 year ago
|
# Make android sdk location, the later make step will populate it.
|
||
5 years ago
|
RUN mkdir android-sdk
|
||
|
ENV ANDROID_HOME $HOME/android-sdk
|
||
1 year ago
|
ENV ANDROID_SDK_ROOT $ANDROID_HOME
|
||
3 years ago
|
ENV PATH $PATH:$HOME/bin:$ANDROID_HOME/platform-tools
|
||
5 years ago
|
|
||
3 years ago
|
# We need some version of Go new enough to support the "embed" package
|
||
|
# to run "go run tailscale.com/cmd/printdep" to figure out which Tailscale Go
|
||
|
# version we need later, but otherwise this toolchain isn't used:
|
||
10 months ago
|
RUN curl -L https://go.dev/dl/go1.22.0.linux-amd64.tar.gz | tar -C /usr/local -zxv
|
||
3 years ago
|
RUN ln -s /usr/local/go/bin/go /usr/bin
|
||
|
|
||
5 years ago
|
RUN mkdir -p $HOME/tailscale-android
|
||
2 years ago
|
RUN git config --global --add safe.directory $HOME/tailscale-android
|
||
5 years ago
|
WORKDIR $HOME/tailscale-android
|
||
|
|
||
1 year ago
|
COPY Makefile Makefile
|
||
6 months ago
|
|
||
1 year ago
|
# Get android sdk, ndk, and rest of the stuff needed to build the android app.
|
||
|
RUN make androidsdk
|
||
|
|
||
5 years ago
|
# Preload Gradle
|
||
|
COPY android/gradlew android/gradlew
|
||
|
COPY android/gradle android/gradle
|
||
|
RUN ./android/gradlew
|
||
|
|
||
6 months ago
|
# Run a shell
|
||
5 years ago
|
CMD /bin/bash
|
||
6 months ago
|
|
||
|
|