diff --git a/Dockerfile b/Dockerfile index 4ff0eaf..60d6d4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,9 +25,6 @@ RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSIO # Install NDK RUN $ANDROID_HOME/tools/bin/sdkmanager "ndk-bundle" -RUN mkdir /workspace -WORKDIR /workspace - # Go section of this Dockerfile from Docker golang: https://github.com/docker-library/golang/blob/master/1.10/alpine3.8/Dockerfile # Adapted from alpine apk to debian apt @@ -77,19 +74,9 @@ RUN set -eux; \ export PATH="/usr/local/go/bin:$PATH"; \ go version -# Set up /workspace +# Setup /workspace +RUN mkdir /workspace + +# Set up GOPATH in /workspace ENV GOPATH /workspace/go -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" ENV PATH $GOPATH/bin:$PATH - -# Add in gomobile - -RUN go get golang.org/x/mobile/cmd/gomobile -RUN go get golang.org/x/mobile/cmd/gobind - -RUN gomobile init -ndk $ANDROID_HOME/ndk-bundle/ - -RUN mv /workspace/go /go - -# First step should be -# ln -sf /go /workspace/go diff --git a/README.md b/README.md index 4af4604..c920e5b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ -first step should be - ln -sf /go /workspace/go +# Android and Go + +likely you are using gomobile for development, so you will want a first step in your pipeline: + + gomobile: + image: openpriv/android-go-mobile + commands: + - go get golang.org/x/mobile/cmd/gomobile + - gomobile init -ndk $ANDROID_HOME/ndk-bundle/ +