Pre-install docker-compose (useful on Windows) #603
Comments
Trying to add this to line 160 of Dockerfile : # Get Fig
ENV FIG_VERSION 1.0.0
RUN curl -L https://github.com/docker/fig/releases/download/$FIG_VERSION/fig-Linux-x86_64 > $ROOTFS/usr/local/bin/fig && \
chmod +x $ROOTFS/usr/local/bin/fig results in : docker@boot2docker:~$ fig
-sh: fig: not found
docker@boot2docker:~$ /usr/local/bin/fig --version
-sh: /usr/local/bin/fig: not found
docker@boot2docker:~$ ls -al /usr/local/bin/fig
-rwxr-xr-x 1 root root 5247064 Oct 28 15:59 /usr/local/bin/fig 😢 Any idea ? |
several :) boot2docker is a 32 bit userspace running on a 64 bit kernel (seriously, its a long tale) ie, you need the 32 bit version |
Ok. So Docker is run in a 64 bits user space, how is possible to manage fig run the same way ? |
Docker is compiled 100% statically, so it can run directly on the 64bit kernel and ignores the userspace entirely. Fig must not be, is my only guess here. |
For my team's needs I made an script+alias that takes place in /var/lib/boot2docker/bootlocal.sh Adding this alias in Boot2docker iso should be a great think for Windows users, and not visible to OS X users. Are you ok with my commit ? |
Proposal of @josephpage and me for generating (quickly ?) a fig official docker image, while waiting for the "Docker groups" proposal implementation : docker/compose#619 (comment) |
Now that |
Just to let you know that this PR : #748 maybe a big help for the future : it will make boot2docker a full 64 Bits OS (user and kernel), leaving possibility to embed docker-compose |
+1, docker-compose is really missing |
@ebuildy but it does run just fine within a container, so it might not really be missing on Windows: see How to install docker-compose on Windows. |
Whilst the native Compose binary doesn't work in the boot2docker VM due to docker/compose#599, installing the docker-compose Python package inside boot2docker works perfectly (from what I can tell so far). In fact, it seems to work even better than the "docker-compose in a container" method (aka As such for now, running the Python docker-compose package inside boot2docker seems to be the most reliable solution for Windows users (having spent many hours trying to battle with the alternatives). To install docker-compose from PyPI, run this from inside boot2docker: docker@boot2docker:~$ tce-load -wi python && curl https://bootstrap.pypa.io/get-pip.py | sudo python - && sudo pip install -U docker-compose To save having to run the above every time the boot2docker VM is restarted (since changes don't persist), you can use bootlocal.sh like so: docker@boot2docker:~$ echo 'su docker -c "tce-load -wi python" && curl https://bootstrap.pypa.io/get-pip.py | python - && pip install -U docker-compose' | sudo tee /var/lib/boot2docker/bootlocal.sh > /dev/null && sudo chmod +x /var/lib/boot2docker/bootlocal.sh (The If you wish to use a pre-release version of docker-compose, then replace |
@edmorley Thanks for this. I used this method to install docker-compose on the Boot2Docker VM, but I have one issue. When I ssh into the VM and run the
I know the daemon is running, because I can run |
|
@edmorley Having done this inside the boot2docker vm (in Windows), I'm now unclear whether I can reference the files I had available on my main disk. What I'm trying to do is make use of docker-compose in a development workflow, so I'd like to mount a local folder into the container. Unfortunately, docker-compose isn't accessible from the boot2docker bash terminal, and the files aren't available to reference if you ssh into the vm. Of course, I might be misunderstanding how it's working... |
By default boot2docker shares anything under As such, if you're able to easily move your src into somewhere under the users folder, the workflow is then as simple as: [~/src]$ boot2docker ssh
...
docker@boot2docker:~$ cd /c/Users/Ed/src/foo/
docker@boot2docker:/c/Users/Ed/src/foo$ docker-compose build
...
docker@boot2docker:/c/Users/Ed/src/foo$ docker-compose up
... |
Hello ! You have to keep in mind that :
On the boot2docker side :
On Windows side using boot2docker as a remote Docker Engine :
The sharing folder part may also be improved when playing in remote mode with Docker 1.7.0 : https://github.com/docker/docker/blob/v1.7.0-rc3/CHANGELOG.md#170-2015-06-16 Hope it helps |
Just added a PR for that : #932 |
Hi Guys, I did some packaging docker-compose + tmux + zsh (prezto - OMZ) into easy installation: you can see on this demo how installation and docker-compose works, including tmux, zsh (prezto - OMZ) hope it helps. |
thanks guys! |
Pre-install Fig is the only way I found to get a working Fig out of box with Boot2docker on Windows.
Fig is lighweight, very useful and now part of Docker, so... why not ?
I'm waiting for your comments.
The text was updated successfully, but these errors were encountered: