Git Product home page Git Product logo

stevedore's Introduction

Stevedore

Stevedore is a helpful aid(e) in building and deploying Docker images to container registries, assuming your code is hosted in a git repository. It encompasses:

  • A build script to build and tag images
  • A push script to build, tag, and then push images to a repository

Get it

go get github.com/zulily/stevedore/...

Use it

> ~/mygroup/myproject/ $ ls
Dockerfile	Makefile	README.md	src/
> ~/mygroup/myproject/ $ stevedore-build
2015/12/22 09:52:25 > git config --get remote.origin.url
2015/12/22 09:52:25 > git rev-parse --show-toplevel
2015/12/22 09:52:25 > git rev-parse HEAD
2015/12/22 09:52:25 Building docker.io/mygroup/myproject:asdf000
...

Build script

Inside the stevedore-build folder is the code for building images locally. Available command-line parameters:

  • -verbose: enables verbose output
  • -i [PATTERN]: only build Dockerfiles with file names that match the regex [PATTERN], e.g. stevedore-build -i dev.
  • -registry-base [REGISTRY]: tag builds with the appropriate registry prefix, e.g. stevedore-build -registry-base docker.io/mygroup

If the -i flag is omitted, you may optionally pass a list of Dockerfile names explicitly for stevedore to build, e.g.:
stevedore-build Dockerfile.dev Dockerfile.staging
This will only build the 'dev' and 'staging' Docker images for your project.

If neither the -i flag or Dockerfiles are provided, stevedore will build all images in the current working directory.

When building, Stevedore automatically tags your built image with {REGISTRY}/{GROUP}/{PROJECT}-{DOCKERFILE-SUFFIX}:{GIT_SHA}.

Push script

The push script (the stevedore-push folder) contains code for building as well as pushing. It accepts all of the same arguments that the build script does.

After building and tagging, it pushes all images it builds to the tagged registry.

In addition to building and tagging with the GIT_SHA of the repo's current HEAD, it will also build and tag a secondary image per Dockerfile with latest.

stevedore's People

Contributors

dcarney avatar smreed avatar dmxroid avatar

Watchers

edwardttril avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.