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
x/mobile: don't depend on docker data volumes for builds #9372
Comments
-v works on my mac. Where does it not work? |
Surprised to hear this. I wrote the original Dockerfile on my mac. On 18 December 2014 at 11:04, David Crawshaw notifications@github.com
|
-v doesn't work when the docker client & server are on different machines that don't share a filesystem, so they can't bind mount. This is moby/moby#4023 |
-v is just being used to determine the mounting point on the container :-/ The source has be mounted on the host machine. It's an overkill and is pretty backwards to share an fs in this particular case. I would like to pack the entire application package as an image and send it to the build server and have no dependencies to the host machine. It's also racy to adopt this model. How am I supposed to run two builds concurrently? By creating a new source point for each build? |
The current version of Docker is for the convenience during development For build-only purpose, we need a better mechanism - check adg's mobiley I think either we need to use mobiley or, use a docker build+run+copy On Wed Dec 17 2014 at 9:43:34 PM Burcu Dogan notifications@github.com
|
To add to what @hyangah wrote, the current workflow is extremely convenient. I work with an app on my desktop in my normal GOPATH, where I can build and run it. Then I use a single command to build an .apk of the same program. Any replacement for the existing docker setup needs to replicate that. I'm open to any solution for features like concurrent and remote builds, as long as it can also do that. Of more interest is getting rid of the android-related junk. In particular, AndroidManifest.xml, build.xml, jni/Android.mk, etc should all be derivable for normal apps. @adg's experiments with mobiley are about getting rid of that burden, which would help the developer experience. It will become more important when building for other platforms is supported, as those will require a different set of build junk and a tool should keep them in sync (ideally by automatically generating them) for the common case. |
boot2docker (at least on macosx and windows) does have some support for volumes thru VBox guest addition, see boot2docker/boot2docker#534 It's exposed thru the |
-vbox-share defaults to the user directory. So, if the user's GOPATH is under their user directory (which is likely the case), they will never notice that the -v flag could be troublesome. In my case, I use a remote machine as my Docker host. I had to share an fs between my laptop and the Docker host and set my GOPATH to the mount point. Maybe, some documentation around -v would be good enough for now. It's so bad that it fails silently. |
The doc was updated and the docker file was changed to require the mounted volume to be accessible. |
docker -v
works only on Linux and silently fails if you run a docker client on a non-Linux machine. It creates confusion for those who are using the following command as instructed as on the README to build their packages.We should copy the package to be built and its dependencies from the host to the container. But, Docker provides no additional tools to help us with this issue.
One alternative is to vendor the dependencies and use ONBUILD ADD to build an app builder image. It will only work if all dependencies are vendored under the Dockerfile's directory, because Docker rejects to add files from outer contexts. https://docs.docker.com/reference/builder/#add
Then the user can do a docker cp to retrieve the apk.
The text was updated successfully, but these errors were encountered: