Skip to content

Docker image for Android and golang / gomobile development

License

Notifications You must be signed in to change notification settings

moohoorama/android-go-mobile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android, Go, and gomobile

This image was built for use with Drone CI but can be used with any docker setup you want.

This image includes:

  • Android SDK, NDK, tools, and API version 28 at /usr/local/android-sdk
  • Go lang 1.10.3 at /usr/local/go
  • $GOPATH set to /workspace/go
  • A go directory with an initialized gomobile installed at /go

This image comes with gomobile checkedout and preinitialized (time and space consuming). In order to install this predone work from the image into your Drone CI workspace (a docker volume mounted to /workspace), you will want your first pipeline step to be:

go-link:
  image: openpriv/android-go-mobile
  commands:
    - cp -as /go /workspace/go

cp -as recreates the directory structure from /go in /workspace/go but for each file, it just creates a symlink. This is the quickest and most efficent way to mirror the work supplied with the image into your workspace.

Re-arrange docker file

  • Change base image openjdk:8 to ubuntu:16.04
  • Install libgl & vim & curl & others
  • Build docker image & make .apk
    docker build .  -t android-gomobile    
    docker run -d --name gomob android-gomobile
    docker exec -it gomob /bin/bash
    
    cd go/src/golang.org/x/mobile/example/basic/
    gomobile build

About

Docker image for Android and golang / gomobile development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 75.8%
  • Vim Script 20.2%
  • Shell 4.0%