简体   繁体   中英

Fig support on Boot2Docker / Windows platform

I am trying to get started with with Docker & Fig using the official Boot2Docker framework.

The Fig website includes instructions for getting Fig working on OS-X ( http://blog.docker.com/2014/10/fig-1-0-boot2docker-compatibility-and-more/ ). However, there are no references for getting Fig working within Boot2Docker under Windows.

I tried the instructions for installing Fig within Boot2Docker from the fig website at http://www.fig.sh/install.html , and ran into a roadblock with this command:

  curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig

Apparently the Boot2Docker filesystem is read-only, so the curl command fails.

Can someone assist me with getting Fig working with Boot2Docker under Windows?

I ended up adding an alias to the boot2docker VM (by editing the default user .profile):

alias fig='docker run --rm -it \
        -v $(pwd):/app \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -e FIG_PROJECT_NAME=$(basename $(pwd)) \
        dduportal/fig'

This actually creates a docker container for running the fig command. The first invocation takes a minute or two, but afterwards it's pretty seamless.

Answer cribbed from: https://github.com/docker/fig/issues/598

当您登录到boot2docker时,您可以运行“ sudo -s”并以root身份执行该操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM