{"id":24233463,"url":"https://github.com/memes/go-gb","last_synced_at":"2025-09-10T11:38:27.679Z","repository":{"id":146197768,"uuid":"43475155","full_name":"memes/go-gb","owner":"memes","description":"Docker container to build a Go project with gb","archived":false,"fork":false,"pushed_at":"2015-10-01T16:56:19.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T11:10:59.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/memes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-01T02:48:26.000Z","updated_at":"2015-10-01T02:48:51.000Z","dependencies_parsed_at":"2023-04-09T00:34:14.891Z","dependency_job_id":null,"html_url":"https://github.com/memes/go-gb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/memes/go-gb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memes%2Fgo-gb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memes%2Fgo-gb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memes%2Fgo-gb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memes%2Fgo-gb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memes","download_url":"https://codeload.github.com/memes/go-gb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memes%2Fgo-gb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274455864,"owners_count":25288557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-14T16:01:17.461Z","updated_at":"2025-09-10T11:38:27.629Z","avatar_url":"https://github.com/memes.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker container to build a Go project with gb\n\nSimple container to build a [Go](http://golang.org) project using [gb](http://getgb.io) with source on the host. Uses volumes to mount a host directory as the project directory in container.\n\n## Build project in current working directory\n1. Make changes to Go code\n1. Start go-gb container and use current directory as source for build\n\n    `$ docker run --rm -v=${PWD}:/home/builder/project memes/go-gb:1.5-v0.2.0`\n\n3. Docker will launch the container, mount current directory as volume and build the application with gb. Compiled output will be in `/bin`\n\n## Cross-compile current project\nSame as above, but pass GOOS and GOARCH variables to create a `.exe` in `bin/`\n\n`$ docker run --rm -e GOOS=windows -e GOARCH=amd64 -v=${PWD}:/home/builder/project memes/go-gb:1.5-v0.2.0`\n\n## Want to force a reset of gb vendor directory?\nYou should take care of that in local copy before invoking container, but it can be forced. Set the env var `GO_GB_RESTORE` to non-empty and a `gb vendor restore` will be executed before the build.\n\n## You say you need to add ldflags or conditional tags? Something more exotic?\nJust like the cross-compile example, all supported Go build environment variables can be assigned by `docker run -e ...` invocation.\n\nAdditional flags can be passed to `go build` by using `GO_GB_FLAGS` variable.\nE.g. `docker run -e GO_GB_FLAGS=\"-tags prod\" ...` will execute `gb build -tags prod`\n\n## Need SSH support for repos?\nAdd the keys to /home/builder/.ssh and make any necessary changes to .gitconfig\n\nClone the github repo [go-gb](https://github.com/memes/go-gb.git) to customise further.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemes%2Fgo-gb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemes%2Fgo-gb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemes%2Fgo-gb/lists"}