{"id":19482523,"url":"https://github.com/git-ogawa/go-dbyml","last_synced_at":"2026-04-29T16:10:11.180Z","repository":{"id":37002206,"uuid":"495055040","full_name":"git-ogawa/go-dbyml","owner":"git-ogawa","description":"CLI tool to help docker build","archived":false,"fork":false,"pushed_at":"2022-08-20T19:10:12.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T17:44:46.482Z","etag":null,"topics":["docker","golang","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-ogawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-22T12:34:18.000Z","updated_at":"2022-05-26T15:53:35.000Z","dependencies_parsed_at":"2022-06-29T23:30:46.434Z","dependency_job_id":null,"html_url":"https://github.com/git-ogawa/go-dbyml","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/git-ogawa/go-dbyml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ogawa%2Fgo-dbyml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ogawa%2Fgo-dbyml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ogawa%2Fgo-dbyml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ogawa%2Fgo-dbyml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-ogawa","download_url":"https://codeload.github.com/git-ogawa/go-dbyml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ogawa%2Fgo-dbyml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32433093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","golang","yaml"],"created_at":"2024-11-10T20:10:55.810Z","updated_at":"2026-04-29T16:10:11.155Z","avatar_url":"https://github.com/git-ogawa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-dbyml\n\n[![License](https://img.shields.io/github/license/git-ogawa/go-dbyml)](https://github.com/git-ogawa/go-dbyml/blob/main/LICENSE)\n[![Release](https://img.shields.io/github/v/release/git-ogawa/go-dbyml)](https://github.com/git-ogawa/go-dbyml/releases)\n[![Go Reference](https://pkg.go.dev/badge/github.com/git-ogawa/go-dbyml.svg)](https://pkg.go.dev/github.com/git-ogawa/go-dbyml)\n\n[![build](https://github.com/git-ogawa/go-dbyml/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/git-ogawa/go-dbyml/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/git-ogawa/go-dbyml)](https://goreportcard.com/report/github.com/git-ogawa/go-dbyml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/86cff2a078d0455f945951c4474e9424)](https://www.codacy.com/gh/git-ogawa/go-dbyml/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=git-ogawa/go-dbyml\u0026amp;utm_campaign=Badge_Grade)\n[![git-ogawa](https://circleci.com/gh/git-ogawa/go-dbyml.svg?style=svg)](https://circleci.com/gh/git-ogawa/go-dbyml)\n\nGo-dbyml is a CLI tool to build a docker image with build options loaded from yaml. Instead of running the `docker build` with many options, write options in config file, build your docker image with them. It helps you to manage build process more readable and flexible.\n\nGo-dbyml is a substitute of [git-ogawa/dbyml](https://github.com/git-ogawa/dbyml) with golang.\n\n\n# Table of Contents\n- [Install](#install)\n- [Preparation](#preparation)\n- [Usage](#usage)\n- [Build with buildkit](#build-with-buildkit)\n- [Configuration](#configuration)\n  - [Image](#image)\n  - [Registry](#registry)\n  - [Buildkit](#buildkit)\n  - [Environment variables](#environment-variables)\n  - [Examples](#examples)\n- [Notes](#notes)\n\n\n## Install\nInstall with `go install`.\n```\ngo install github.com/git-ogawa/go-dbyml@latest\n```\n\nYou can also manually download the binary from [release page](https://github.com/git-ogawa/go-dbyml/releases). Put it the directory in the $PATH.\n\n\n## Preparation\nTo use go-dbyml, Docker Engine must be installed on host for build and run docker commands without root privileges (as non-root user) on client. Refer to [Manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) or [Docker rootless mode](https://docs.docker.com/engine/security/rootless/) for non-root user setting.\n\n\n## Usage\nTo build your image from Dockerfile, you must make `Dockerfile` and configuration file `dbyml.yml`. The file `dbyml.yml` is written in yaml syntax and contains the settings related to image build such as tags, build-args or label. To make the file, copy the contents from [examples/dbyml.yml](examples/dbyml.yml) or make by the following command.\n\n```\n$ go-dbyml --init\n```\n\nYou can edit the contents of the generated file in order to change settings about image build (name, tag, label or whether to push the image to a private registry). After that,run the `go-dbyml` in the same directory where the config file exists to build the image with the settings.\n```\n$ go-dbyml\n```\n\nAfter successfully building, the docker image will be created.\n```\n$ docker images\nREPOSITORY           TAG                 IMAGE ID       CREATED         SIZE\ngo-dbyml-sample      latest              cf55541823c7   5 hours ago     5.6MB\n```\n\n\nGo-dbyml has the following features for image build (these are the same as [git-ogawa/dbyml](https://github.com/git-ogawa/dbyml)).\n- [Set build-args and labels in image](https://github.com/git-ogawa/dbyml#build-args-and-labels)\n- [Push the image to a private registry](https://github.com/git-ogawa/dbyml#push-to-repository)\n\nMost of features work by replacing `dbyml` with `go-dbyml`, but there are some differences (see [Notes](#notes)).\n\n\n## Build with buildkit\nGo-dbyml supports image build with [buildkit](https://github.com/moby/buildkit). The build with buildkit enables you to build multi-platform image and export and import build cache to external registry.\n\n\nAdditional settings are required in configuration file in order to enable buildkit. See [Buildkit](#buildkit).\n\n# Configuration\nThe configuration about go-dbyml are managed by configuration file `dbyml.yml` written in yaml syntax. The Settings are automatically loaded from the file in current directory when run go-dbyml. Run `go-dbyml --init` to generate a config file from template.\n\n\nThe `dbyml.yml` consists of the following sections at the top level.\n\n- Image\n- Build\n- Registry\n- Buildkit\n\nSee the following description and [examples/dbyml.yml](examples/dbyml.yml) to know how to set these values.\n\n\n## Image\nThe image section defines the basic settings about image to be built.\n\n- `name`: The name of image.\n- `tag`: The tag of image.\n- `path`: Path to directory where Dockerfile exists.\n- `dockerfile`: The filename of Dockerfile.\n- `build_args`: The build-args used on build. These are passed as `docker build --build-arg [args]`.\n- `label`: The labels used on build. These are passed as `docker build --label [labels]`.\n- `docker_host`: URL to the Docker server.\n\n## Registry\nThe registry section defines the registry information to which the built image is pushed.\n\n- `enabled`: Set true to enable pushing image to a registry.\n- `host`: Registry hostname including port.\n- `insecure`: Set true to allow insecure server connections.\n- `auth`: Credentials used when connect for auth-registry.\n\n## Buildkit\nThe buildkit section defines the settings about buildkit. To build a image with buildkit, add the `buildkit` section in configuration file and set `enabled` to true.\n\n### output\nThe output field sets output format of the image to be built. Only `Image` is supported now, which means the built image will be pushed the specified registry.\n\n- `type`: Set `image`\n- `name`: Set registry and image. e.g. `[registry]:[port]/[project]/[image]:[tag]`.\n- `insecure`: Set true if push the image insecure registry such as insecure private registry. false otherwise.\n\n### cache\nThe cache field sets import and export build cache. See [Cache](https://github.com/moby/buildkit#cache) for details.\n\n\n#### export\n\n- `type`: `inline` or `registry`.\n- `value`: Set registry and image. e.g. `[registry]:[port]/[project]/[image]:[tag]` if type is registry.\n\n\n#### import\n\n- `type`: `registry`.\n- `value`: Set registry and image. e.g. `[registry]:[port]/[project]/[image]:[tag]` if type is registry.\n\n\n### platform\nIf you want to build a image supports multi-platform, Set the list of architectures to be supported in `platform` field.\n\n\n## Environment variables\nYou can use environment variables in config file.\n\n- To use the environment variable, set `${VARIABLE_NAME}`\n- To use default value, set `${VARIABLE_NAME:-DEFAULT_VALUE}`.\n\n```yaml\nimage:\n  name: ${IMAGE_NAME}         # Set the value of ${IMAGE_NAME}.\n  tag: ${TAG_NAME:-latest}    # Set latest if ${TAG_NAME} is undefined.\n```\n\nAn error will be raised on build if the environment variable is undefined.\n\n```yaml\nimage:\n  name: ${UNDEFINED}        # \u003e\u003e ENV ${UNDEFINED} not defined.\n```\n\n\n## Examples\nSee [examples/dbyml.yml](examples/dbyml.yml) for an example of configuration.\n\n\n## Notes\nCompared to [git-ogawa/dbyml](https://github.com/git-ogawa/dbyml), there are some differences regarding the fields in the configuration file and features.\n\n\n### ENV variables\nThe environment variable expression has been supported since v1.2.0.\n\n\n### Build section\nThe following fields are currently enabled.\n\n```yaml\nbuild:\n  target: ''\n  no_cache: false\n  verbose: true\n```\n\n\n### Registry section\nThe host and port has been merged in host field, so set the format as \"hostname:port\" in the field.\n\n```diff\nregistry:\n    enabled: true\n-    host: \"myregistry\" # Registry hostname or ip address\n-    port: \"5000\" # Registry port\n+    host: \"myregistry:5000\"\n```\n\n\n### Buildx section\nBuild with buildkit which works like buildx has been supported since v1.1.0.\n\n\n### TLS section\nThe connection for docker host using TLS (HTTPS) dose not be supported yet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-ogawa%2Fgo-dbyml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-ogawa%2Fgo-dbyml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-ogawa%2Fgo-dbyml/lists"}