{"id":18273299,"url":"https://github.com/spacetab-io/docker-images-golang","last_synced_at":"2026-04-18T04:33:03.812Z","repository":{"id":105021298,"uuid":"258724967","full_name":"spacetab-io/docker-images-golang","owner":"spacetab-io","description":"base docker images for golang projects pipelines","archived":false,"fork":false,"pushed_at":"2022-12-02T10:52:26.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T03:36:05.026Z","etag":null,"topics":["building","docker","docker-image","docker-images-golang","dockerfile","go","golang","lint","linter","testing","testing-golang"],"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/spacetab-io.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-25T08:40:24.000Z","updated_at":"2022-04-19T06:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef7ac00e-2780-4ce8-847f-bf930fd43605","html_url":"https://github.com/spacetab-io/docker-images-golang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spacetab-io/docker-images-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacetab-io%2Fdocker-images-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacetab-io%2Fdocker-images-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacetab-io%2Fdocker-images-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacetab-io%2Fdocker-images-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacetab-io","download_url":"https://codeload.github.com/spacetab-io/docker-images-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacetab-io%2Fdocker-images-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31956962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["building","docker","docker-image","docker-images-golang","dockerfile","go","golang","lint","linter","testing","testing-golang"],"created_at":"2024-11-05T12:05:56.536Z","updated_at":"2026-04-18T04:33:03.787Z","avatar_url":"https://github.com/spacetab-io.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"docker-images-golang\n-------------------\n\nImages for docker containers:\n\n* [Lint environment](linter) container is for lint golang app source code.\n  Uses [golangci-lint](https://github.com/golangci/golangci-lint) to lint code\n  with [custom config](https://github.com/spacetab-io/linter-go).\n* [Test environment](test) container is for testing golang app. Has all things to test golang sources with `go test`. \n* [Build environment](build) container is for building golang app. Has all things to build golang app with go modules. \n* [Base environment](base) container is for running golang app. Has all things to run binaries in formalized application \nstructure. Exposes `8080` port and run service command: `/app/bin/service`. Only thing you must do is copy binaries, \nMakefile (if needed), migrations (if needed) and application default configuration.\n\n## Building image\n\nSimply run a `make` command\n    \n    make build-base-image   # to build base image\n    make build-build-image  # to build building image\n    make build-linter-image # to build linterr image\n    make build-test-image   # to build test image\n    make build-all          # to build all images\n\n## Pushing image\n\nSimply run a `make` command\n    \n    make push-base-image   # to push base image\n    make push-build-image  # to push building image\n    make push-linter-image # to push linterr image\n    make push-test-image   # to push test image\n    make push-all          # to push all images\n\n## Images usage\n\nCommon usage application Dockerfile:\n\n```dockerfile\nFROM spacetabio/docker-lint-golang:1.12-latest as lint-env\n\nCOPY . /app\nRUN make lint\n\n# ----\n\nFROM spacetabio/docker-test-golang:1.12-latest as test-env\n\nCOPY . /app\nRUN make test\n\n# ----\n\nFROM spacetabio/docker-build-golang:1.12-latest as build-env\n\nCOPY . /app\nRUN make all\n\n# ----\n\nFROM spacetabio/docker-base-golang:1.12-latest\n\nCOPY --from=build-env /app/bin/*                  /app/bin/\nCOPY --from=build-env /app/Makefile               /app/\nCOPY --from=build-env /app/migrations/*           /app/migrations/\nCOPY --from=build-env /app/configuration/defaults /app/configuration/defaults\n```\n\nIf private packages are used, build it with Dockerfile below and command: \n`docker build -t \u003cimagename\u003e:\u003ctag\u003e --build-arg TOKEN=\"$(cat ~/.ci-token)\" --build-arg PRIVATE_REPO=\"private.repo.url\" .`\n\n```dockerfile\nFROM spacetabio/docker-test-golang:1.12-latest as test-env\n\nARG TOKEN\nARG PRIVATE_REPO\nRUN git config --global url.\"https://ci-token:${TOKEN}@${PRIVATE_REPO}/\".insteadOf 'https://${PRIVATE_REPO}/'\n\nCOPY . /app\nRUN make test\n```\n\n## LICENCE\n\nMIT License\n\nCopyright (c) 2022 Spacetab.io\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"\nSoftware\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacetab-io%2Fdocker-images-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacetab-io%2Fdocker-images-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacetab-io%2Fdocker-images-golang/lists"}