Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfile for required build environment #20

Merged
merged 1 commit into from
Jul 6, 2015

Conversation

realAkhmed
Copy link
Contributor

Hello everyone! I experienced some considerable difficulties setting up the build environment correctly. Given that the same issue puzzles others as well as referenced by #15 #18 #19, I created a Dockerfile that creates a container (virtual machine) with full build environment (including IDEA) required to run the "Hello World" example.

How to use it?

$ git clone https://github.com/pocorall/hello-scaloid-sbt/
$ cd hello-scaloid-sbt/
$ docker build -t scaloid .

this last line will start downloading packages and building the container for you. (Note: it will download several GBs)

Once Docker is done creating the image you can run by typing the following commands on the host:

$ export XSOCK=/tmp/.X11-unix/X0
$ xhost +localhost
$ docker run --privileged -v $XSOCK:$XSOCK -v /dev/bus/usb:/dev/bus/usb -it scaloid

then you get connected to the container and inside the container you can type:

$ idea-run

to start IDEA. Xserver connection is set up so that you can run IntelliJ IDEA from inside the container.

The container will have:

  • Working Debian 8 system with user "scaloid"
  • Android SDK 24.3.3 + Google APIs
  • SBT 0.13.8
  • JDK 7
  • IntelliJ IDEA 14.1.4 with SBT plugin (1.7.0) + Scala plugin (1.5.2) both pre-installed
  • freshly cloned hello-scaloid-sbt project
  • fully working adb: you can just connect your phone to the host machine and your phone will be fully accessible inside the container.
  • the container also compiles hello-scaloid-sbt project after downloading for your convenience (no compile errors).

Any comments are welcome!

@pocorall
Copy link
Owner

Thanks! I will review your request shortly.

pocorall added a commit that referenced this pull request Jul 6, 2015
Added Dockerfile for required build environment
@pocorall pocorall merged commit d34dc97 into pocorall:master Jul 6, 2015
@realAkhmed realAkhmed deleted the Dockerfile branch July 8, 2015 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants