Docker image and bash script for running compose in a container#1806
Docker image and bash script for running compose in a container#1806mnowster merged 1 commit intodocker:masterfrom
Conversation
There was a problem hiding this comment.
Does everything work fine if $(pwd) is a subdir of $HOME and we get overlapping volume mounts?
There was a problem hiding this comment.
Ya, that doesn't seem to be a problem from what I can tell
|
Interesting. Would this make Windows support easier? Paths, TTYs, etc... #1085 |
|
It would run easily enough in cygwin I think, but I don't think windows comes with bash, right? We could re-create this bash script in golang, and publish it as a statically linked binary, which might make it more portable. |
|
Sorry - yes. Assuming we have a similar script or binary running on Windows that runs Compose in a container, would Compose running inside a container work on Windows? |
|
Yes, it would. The other assumption is that volume mounting would 'just work', as it does on OS X (as long as you're within your home directory). |
There was a problem hiding this comment.
What if we added compose-run to the image itself, using docker as the distribution mechanism, and a small install script to echo/output it, e.g.;
# To install the script wrapper, run
$ docker run --rm docker-compose install > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
# Validate it's working
$ docker-compose --version
docker-compose version: 1.4.0rc3
There was a problem hiding this comment.
That's a cool idea, I think that could work.
There was a problem hiding this comment.
That is a cool idea. We should probably put an explicit version tag in, so we can change the run script if we need to.
There was a problem hiding this comment.
Could it be a separate image? If you install Compose with the Toolbox, the "install" command might be confusing.
There was a problem hiding this comment.
Ya, since this command is really just printing out the bash script, we could probably call it echo-run-script or something like that?
There was a problem hiding this comment.
The advantage of it being in the same image, is that the image is pulled during "install". The first "run" is instant then :-)
|
@dnephin if you can do a rebase, I'll review. |
|
Rebased |
There was a problem hiding this comment.
Minor edit: Can we make this a link to the alternative install section? Then we can remove the, 'below'.
There was a problem hiding this comment.
Ya, it seems like there is no standard way to do that with markdown? I guess I have to do something like this https://gohugo.io/extras/crossreferences/ , I'll try it out
There was a problem hiding this comment.
I tested it out locally, seems to work
52af569 to
8e85709
Compare
There was a problem hiding this comment.
I would suggest Install as a container as a more descriptive header.
d9bc968 to
1b5a13c
Compare
There was a problem hiding this comment.
I think this is missing a $ at the beginning so it'll get rendered as a command.
|
Cool, I've made those changes |
…it with the correct volumes. Signed-off-by: Daniel Nephin <dnephin@gmail.com>
|
LGTM |
Resolves #169
Resolves #1662
The image is ~50Mb.
Thoughts?