• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

winton/gulp-docker

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

winton/gulp-docker

开源软件地址(OpenSource Url):

https://github.com/winton/gulp-docker

开源编程语言(OpenSource Language):

CoffeeScript 85.3%

开源软件介绍(OpenSource Introduction):

GulpDocker

Gulp tasks for managing Docker images and containers.

Gulpfile

Within your Gulpfile, initialize GulpDocker with an instance of gulp and container options:

var gulp       = require("gulp");
var GulpDocker = require("gulp-docker");

new GulpDocker(gulp, {
	sidekick: {
		build: "bin/build"
		run:   "bin/sidekick",
		env:   { ENV: "production" },
		git:   "[email protected]:winton/sidekick.git#release",
		repo:  "quay.io/winton/sidekick"
	}
});

Container Options

Each key of the object is the container name.

Each value of the object is another object with the following possible keys:

  • build - The command to run within the Docker container after building the image, before pushing (optional).
  • dockerfile - The directory to discover the Dockerfile (optional).
  • env - Object containing environmental variables (optional).
  • git - A git repository URL string (optional).
  • name - The name of the container (required).
  • ports - An array of port strings in "[host-port]:[container-port]" format (optional).
  • repo - The Docker repository to push to on build (optional).
  • run - The command to run within the Docker container (optional).
  • tags - An array of tags to use when pushing the image (required).
  • volumes - An array of volume strings in "[host-dir]:[container-dir]:[rw|ro]" format (optional).

Tasks

  • docker:image - Build and optionally push one or more Docker images.
  • docker:restart - Restart one or more Docker containers.
  • docker:run - Run one or more Docker containers.
  • docker:stop - Stop one or more Docker containers.

What happens on build?

  • Ask user which containers to build and (optionally) push.
  • Clone a pristine copy of the app.
  • Run docker build within app directory (Dockerfile should be present).
  • Push the Docker image if specified.

What happens on run?

  • Build happens if image is not found (see above).
  • Generate run arguments from container options.
  • Call docker run with arguments.

Dev setup

npm install

Docs

node_modules/.bin/codo lib
open doc/index.html



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap