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

Feature Request: Dockerfile or image in dockerhub #589

Closed
fruch opened this issue Nov 29, 2017 · 15 comments · Fixed by #681
Closed

Feature Request: Dockerfile or image in dockerhub #589

fruch opened this issue Nov 29, 2017 · 15 comments · Fixed by #681

Comments

@fruch
Copy link

fruch commented Nov 29, 2017

there's an offical VM,
I was looking for offical dockerhub image, cause it's much easier to operate (and automated, i.e. travis-ci and such)

Are some technical diffeculties that I'm missing or just no on had time to invest in it ? what's actully needed to make it "offical" ?
I see some people have something working (I guess, didn't tried it yet)
https://github.com/tshirtman/Buildozer-docker/blob/master/Dockerfile

@jedie
Copy link

jedie commented Nov 29, 2017

I have made a docker image here: https://hub.docker.com/r/jedie/buildozer/ sources here: https://github.com/jedie/kivy-buildozer-docker and a project that use it here: https://github.com/jedie/RunCalculator

The idea was to create docker image and the .apk on Travis-CI ;)

@fruch
Copy link
Author

fruch commented Nov 29, 2017

would be nice to have this in the offical docs

@inclement
Copy link
Member

The reason this is not officially supported or documented is entirely that nobody has had time to do it. I hope to get time to look into it at some point.

@fruch
Copy link
Author

fruch commented Dec 6, 2017

👍

python + kivy + docker + android, all the things I love together. that would be great.

@James-E-A
Copy link

Would absolutely love something like this officially distributed.

There seem to be a few unofficial images floating around GitHub in various states of disrepair [1][2], but it looks like it's not going to be so simple to run a build server.

I really really like what you've done with this, to be able to have an entire Android development toolchain without "dirtying one's hands" (or cluttering one's system) with the nitty-gritty details normally accompanying preparing a build cycle (or, worse yet, being vendor-locked) is great, and being able to run it in Docker would add just that much more ease of deployment.

@robertpro
Copy link
Contributor

Actually I think this will improve the people get involved into Kivy, since every time I talk about kivy, some one tells me that it is hard to install and just give up, and said this is only for Python enthusiastic people, but I don't think this is true, because I found a lot of potential on Kivy.

So dockerizing Kivy, would increase the community.

@AndreMiras
Copy link
Member

I can work on it if you guys are still interested :)

@fruch
Copy link
Author

fruch commented Jun 18, 2018

@AndreMiras would love to take if for a spin

@robertpro
Copy link
Contributor

@AndreMiras very interested

@AndreMiras
Copy link
Member

So I see two approaches depending on the goals we want to achieve.

  1. we want it for continuous integration, making sure after each push things work as expected
  2. we want to provide a Dockerfile for people to use it for their projects

For 1. basically the build buildozer from source code after each push and run tests on it, but it's not convenient for people to use. And for 2. we provide a Dockerfile that installs/provides the latest buildozer release

I can work on both, but what do you guys want first?

@fruch
Copy link
Author

fruch commented Jun 18, 2018 via email

@AndreMiras
Copy link
Member

Thanks guys, I'll look into it soon then 😄

AndreMiras added a commit to AndreMiras/buildozer that referenced this issue Jun 18, 2018
Installs buildozer and dependencies.
Build with:
```sh
docker build --tag=buildozer .
```
Run with:
```sh
docker run buildozer /bin/sh -c 'buildozer --version'
```

This is still in work in progress status since it doesn't yet share
files (current working directory) with the host.
It may just require to mount it properly with docker command line options.
@AndreMiras
Copy link
Member

Work in progress here:
#681

So basically it makes it provides the buildozer command, but doesn't currently share the file system with the host. It means that you cannot yet use it to build projects on your host, unless you ADD them manually.
Mounting the host current working directory to the docker guest might just be enough. But I need to take a look because it could be cumbersome.
I'll keep you posted.

AndreMiras added a commit to AndreMiras/buildozer that referenced this issue Jun 18, 2018
Documents how to mount host current working directory using `--volume` option.
Also adds an `ENTRYPOINT` to ease command line usage.
@AndreMiras
Copy link
Member

I've updated the Dockerfile with comments how to mount it with host CWD.
So basically after building the image (pretty quick), I was (almost) able to build an apk doing a:

docker run --volume "$(pwd)":/home/user/hostcwd buildozer android debug

I'll investigate why the apk didn't build completely and give an update rather than this is for sure fixed or not.

AndreMiras added a commit to AndreMiras/buildozer that referenced this issue Jun 19, 2018
AndreMiras added a commit to AndreMiras/buildozer that referenced this issue Jun 19, 2018
Installs buildozer and dependencies, documents usage.

To build the image you first need to `cd` to where the `Dockerfile` is,
then run:
```sh
docker build --tag=buildozer .
```
Then you can use the container e.g. with:
```sh
docker run --volume "$(pwd)":/home/user/hostcwd buildozer --help
```
The above command mounts host current working directory in container
using `--volume` option.
Also added workaround for kivy#625
@AndreMiras
Copy link
Member

Pull request with working Dockerfile is ready in #681

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 a pull request may close this issue.

6 participants