Giter Club home page Giter Club logo

dockygo's Introduction

Dockygo

docker image builder for go micro services

Features:

  • use buildx/buildkit to build docker images
  • reduce docker image size using upx to compress go binary
  • supports multistage build
  • supports yaml config file
  • registry management
  • supports http/https proxy

Installation

you can build and install dockygo on your linux machine using builder script.
1- first clone the repository

git clone "https://github.com/Gictorbit/dockygo.git"

2- execute builder script

cd dockygo && chmod +x build.sh && ./build.sh

Config File Example

by default dockygo looks for configuration file in current directory like Dockerimg.yaml.
users can overwrite file options using command line flags

image:
  name: dockygo-api
  username: dockygo
  environment:
    COMPANY_HOST: "github.com/dockygo"
    GITHUB_TOKEN: "${GITHUB_TOKEN}" #looks for env variable
  settings:
    compress: true
    latest: false
    cache: false
    http_proxy:
    https_proxy:
    no_proxy:
  golang:
    proxy: global #[golang,global,china] default:global
    version: 1.19 #default: current installed version
registries:
  - name: local
    url: reg.dockygo.com

Usage

usage: dockygo [<flags>] <command> [<args> ...]

docker image builder for go micro services

Flags:
  -h, --help  Show context-sensitive help (also try --help-long and --help-man).

Commands:
  help [<command>...]
    Show help.

  build --registry=REGISTRY [<flags>]
    build docker image

  release --registry=REGISTRY [<flags>]
    release built image to registry

Build

use build command to build your docker image

build docker image

Flags:
  -h, --help                     Show context-sensitive help (also try --help-long and --help-man).
  -v, --version                  Show application version.
  -n, --name=""                  name of image
  -r, --registry=REGISTRY        name or url of registry
  -u, --user=USER                registry username
  -g, --goproxy="golang"         set go mod proxy
  -c, --compress                 reduce go binary using upx
  -f, --dockerfile=./Dockerfile  path of docker file
      --http-proxy=HTTP-PROXY    set http proxy
      --https-proxy=HTTPS-PROXY  set https proxy
      --no-proxy=NO-PROXY        set no proxy
      --cache                    enable docker cache
      --goversion="1.19"         specify go version
  -t, --tag="v1.0.5"             docker image tag
  -l, --latest                   build latest tag for image
      --nobuildx                 disable buildx mode
  -p, --push                     push built images to registry

Release

use release command to push your built docker image to registry

usage: dockygo release --registry=REGISTRY [<flags>]

release built image to registry

Flags:
  -h, --help               Show context-sensitive help (also try --help-long and --help-man).
  -t, --tag="v1.0.1"       release image tag
  -l, --latest             release latest tag for image
  -n, --name=NAME          name of image
  -r, --registry=REGISTRY  name or url of registry
  -u, --user=USER          registry username

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.