Last Updated: February 25, 2016
·
780
· clonn

fig usage and setting docker-osx install

fig usage and setting docker-osx install

download virtaulbox and vargant.

docker-osx

docker-osx github project link

https://github.com/noplay/docker-osx

install fig

follow steps to install fig, fig installation

config fig

this sample, only build a server via node.js, so we only need web setting and set port.

fig.yml,


web:
build: .
command: node /myapp/index.js
volumes:
- .:/myapp
ports:
- "3000:3000"
</pre>

However fig have to set a master image to connect to other images, have to set a Dockerfile. Cause we only use node.js service, you can source from docker hub.

Dockerfile,

FROM dockerfile/nodejs

usage

start fig and you can build fig yml to a docker image, or start up a web application via fig.

fig run web

you can runs fig in background

fig run -d web

or build a docker image

# build a docker image
fig build

conclusion

At first i have no idea what can i do with docker, after a while i slowly figure out how docker works for, and i can use docker pizzle my infra via tiny every different service.

fig complete docker leaks, fig is a config can combine different service together by fig.yml. that is we want.

there is my fig node.js simple server example, you can fork and clone by yourself.