运行,构建和部署Dockerized应用:Smuggler

jopen 10年前

Smuggler是一个简单但强大的系统设计用于操作docker,帮助你运行,测试,开发和构建他们,让他们随时适用任何 docker 集群环境。 Smuggler还搭建了一个相当简单的集群管理用于小型使用。

name: smuggler  image: debian:jessie  image_dockerfile: dockerfiles/deb.dockerfile    # Open ports  ports:      - 8000:80      - 3307:33    # Use volumes  volumes:      - /home/smg:/home/smg    # Setup env variables  env:      - TEST=127.0.0.1    # Use simple services  services:      - mongo      - redis    # Or complex applications  # (applications are run instead of services if exists)  applications:      cassandra:          image: cassandra          image_dockerfile: example/dockerfiles/cassandra.dockerfile          name: cassandra          ports:            3305:3306    # and run commands against it  commands:      default:          - ping -c 1 cassandra          - echo "You should write some tests"      test:          - echo "test party"      make:          - make    # Next feature to be implemented (asap)  # Dockerfiles will be run if exist instead of commands  dockerfiles:      default:          dockerfile: dockerfiles/my.dockerfile          entrypoint:              - "/bin/echo"          cmd:              - "test"    # And build it once you're ready  # Build use the Dockerfile in the current directory  # You'll soon be able to specify it too    # onlyif with search for this environment  # in commands  # (soon in dockerfiles first and then commands)    # build works with regexp too  build:      master:          name: local/smuggler          onlyif: testing          push: true      dev:          name: smuggler          onlyif: make          push: false      ^test.*:          name: test          push: false

项目主页:http://www.open-open.com/lib/view/home/1417577018027