Add script which runs Fig inside Docker#619
Conversation
|
Seems reasonable to me. Maybe add these comments (usage and purpose) from the PR into the script as documentation? |
|
Running Fig inside Docker is also the only way to run fig on Windows. See #599 |
|
I also really like the idea of an official image for this. I believe we can add that as a step to the wercker build. |
|
@dnephin Great. I'm thinking about adding a "official-image" folder in the root of this repo with the Dockerfile of dduportal/fig image @dduportal : Have you imagined something more minimalist ? I can make the whole process, from writing README.md to submitting PR to docker-library/official-images. |
|
@josephpage The official image should be the Dockerfile in the root of this repository. I think the only change that is needed is to have an entrypoint of |
|
Also: the official build should be stable versions, so Wercker doesn't need to do anything. Latest can point at the tag of the latest version on Git. This kinda thing: https://github.com/docker-library/official-images/blob/master/library/crate |
Doesn't that require docker.sock to be mounted inside the container (or some other connection to the daemon)? |
|
@thaJeztah Yep. Baby steps. ;) |
It works, but the official image will contain unnecessary build dependencies. |
|
Hi all, there is an interesting discussion here :moby/moby#8637 . My thought is : Which energy should we spend to "perfectly Dockerize" fig in an official image, given that it should probably integrated as part of Docker in a near future ? So on, the @josephpage proposal seems a good idea : his contribution to my image seems really lightweight and simple : from a debian:wheezy image, he just add the fig binary, re-using the description of an entrypoint to fig, making it really usefull for people coming from Windows world. See boot2docker/boot2docker#603, boot2docker/boot2docker#603 or #599 for example => made me think that official image should be a good starting point for "now". As addon about Dockerfile considerations, i personnaly use these guidelines :
It state some rules (not mandatory, but i really think its goods idea) to not embed dev. env inside production targeted container, which should be the case.
Advices ? |
|
@dduportal the links should be http not https, had to change some things around ,sry |
|
@crosbymichael Thanks for the fix ! Links edited in the comment ! |
|
Here we go: #661 |
678393f to
407124b
Compare
|
Rebased with #661. |
|
I think it could use a short comment explaining what it's for, otherwise LGTM |
|
This needs to be rebased/re-branded. A request for a script like this just came up in IRC :) |
|
I put this together back in June. It does docker-in-docker, but could be modified to also support being given a socket (it might already work, but I haven't tried it) https://github.com/ewindisch/figleaf Usage is to add a 'fig.yml' file to the current context and create a Dockerfile. One could do, for instance: Another option would be to run figleaf directly: |
|
Thanks for sharing, @ewindisch, will give it a spin when I get home. |
407124b to
de78137
Compare
de78137 to
69fb34e
Compare
There was a problem hiding this comment.
So I guess the tradeoff here (vs using an official image that gets pulled on the first run) is that it's probably a bit faster the first run, but a bit slower on subsequent runs. Even with the cache, it's still going to take a second or two to run each time, right?
That seems ok for a first pass, but we should really consider moving to just pulling an image from the docker registry.
There was a problem hiding this comment.
Perhaps we should follow the same logic as docker run: attempt to run, check for the "No such image" error, build the image and try again.
For actual distribution, I agree - we should be pulling a tagged image from the registry.
There was a problem hiding this comment.
👍 and the image should just have the built binary in it. See: https://github.com/docker/swarm-library-image
This is just for development, however.
|
Seems to work well, except I had to remove the I'm concerned that you can't specify a |
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
69fb34e to
0fa0131
Compare
|
Oops, that's to follow symbolic links, but it doesn't work when it's not a link. Fixed. |
|
LGTM |
…docker Add script which runs Fig inside Docker
|
Is there anything else that prevents the official docker-compose docker image set up? If not, who can do that? |
…nside-docker Add script which runs Fig inside Docker Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Handy for development. Works something like this:
Maybe needs a better name? Should we update CONTRIBUTING.md?