voicepipe

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2015 License: MIT Imports: 12 Imported by: 0

README

VoicePipe Build Status

Build parameterized Docker images from a single Dockerfile.

Description

As you know, you often need to manage multiple Docker images, depending on versions of applications or configurations for environments (e.g. development, staging, production etc.)

The docker build command, however, has no options to inject such parameters. Thus you must manage multiple Dockerfiles separately, and of course they bother you.

VoicePipe generates and builds multiple Dockerfiles from a single Dockerfile by overriding ENV instructions. So you can define parameters as environment variables in your Dockerfile.

Requirement

Installation

$ go get https://github.com/y-taka-23/voicepipe

Example Usage

Let us build multiple Nginx images, each of them has different index.html files, from a single Dockerfile by VoicePipe.

Assume the following directory structure. You will find it under the example in this repository.

+--- Dockerfile
+--- index
|    +--- index_develop.html
|    +--- index_latest.html
|    `--- index_production.html
`--- voicepipe.yml

First, define your application with a Dockerfile:

$ vi Dockerfile
FROM nginx
ENV INDEX_HTML index_latest.html
COPY index/${INDEX_HTML} /usr/share/nginx/html/index.html

Next, define the parameters for each images in voicepipe.yml:

$ vi voicepipe.yml
repository: user/nginx
images:
  - tag: develop
    description: "for the development environment"
    parameters:
      - name: INDEX_HTML
        value: index_develop.html
  - tag: production
    description: "for the production environment"
    parameters:
      - name: INDEX_HTML
        value: index_production.html

Finally, run VoicePipe in the example directory.

$ voicepipe build

VoicePipe will build the Docker images user/nginx:develop and user/nginx:production with the corresponding index_*.html files.

For more detail, see voicepipe help.

License

MIT

Author

y-taka-23

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL