Examples¶
A great way to get started with dobi is to look over some examples.
Full Configs¶
- dobi - a Golang
command line tool (
dobiuses itself!). This example demonstrates:dist-img- building a minimal image (that doesn’t contain build dependencies) for distributing an application.- building multiple images for different tasks (
builder,linter,releaser) watch- watching code for changes and auto-running unit tests anddocs-watchfor watching docs changes and auto-building the docs.shell(anddocs-shell) - getting an interactive shell that contains all the dependencies required to build or test the project.- combinding tasks with an alias so they can be run together (
test, andall).
- PyStaticConfiguration - a
python library. This example demonstrates:
pypiconf- providing secrets to containers by mounting a filerelease- automating the steps of the release process
Use Cases¶
- examples/minimal-docker-image - building a minimal docker image, that does not contain build/compile dependencies. This is sometimes referred to as “squashing” an image.
- examples/tag-images - tag images with metadata (git sha, git branch, datetime, and version)
- examples/project-setup
- prompt users for configuration and generate a
.envfile if it doesn’t exist. - examples/init-db-with-rails - load database tables and fixtures from rails models and create a database image and development environment.
- examples/init-named-volume - create or update the files in a named docker volume.
- examples/inline-dockerfile
- inline Dockerfiles in the
dobi.yamlto reduce the number of build files. - examples/env-vars - populate environment variables from job task output