LoginSignup
5
5

More than 5 years have passed since last update.

fig少しだけ触ってみた

Last updated at Posted at 2014-10-23

参考: Getting started | Orchard

インストール

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

fig.yml記述

fig.yml
www:
  image: centos:centos7
  privileged: true
  ports:
    - 22 # ssh
    - 80 # web
    - 443 # web
    - 8080 # web test
    - 25 # mail
    - 110 # mail
    - 587 # mail
    - 161 # snmp
    - 3306 # mysql
    - 5666 # nagios
    - 10050 # zabbix
    - 10051 # zabbix
  volumes:
    - log:/var/log/httpd
figからコンテナ生成しコマンド実行
fig run www ls -l
fig run www yum info vim

apache + mysql

fig.yml
phpapache:
  image: php:5.6.3-apache
  ports:
    - '80:80'
mysql:
  image: mysql
  ports:
    - '3306:3306'
  environment:
    MYSQL_ROOT_PASSWORD: password
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5