GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - winton/gulp-docker

BranchesTags
Open more actions menu

Latest commit

 

History

36 Commits
36 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
lib
lib
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
Dockerfile
Dockerfile
 
 
Gulpfile.js
Gulpfile.js
 
 
README.md
README.md
 
 
package.json
package.json
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

27 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.