{"id":19838495,"url":"https://github.com/metal-stack/builder","last_synced_at":"2025-05-01T18:31:17.718Z","repository":{"id":38205547,"uuid":"237983689","full_name":"metal-stack/builder","owner":"metal-stack","description":"Builder image to create go applications.","archived":false,"fork":false,"pushed_at":"2024-11-11T13:38:22.000Z","size":75,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-11T14:33:01.667Z","etag":null,"topics":["dockerfile","golang"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/metal-stack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-03T14:24:27.000Z","updated_at":"2024-11-11T13:38:23.000Z","dependencies_parsed_at":"2023-02-15T06:31:06.694Z","dependency_job_id":"4b08569c-d5b8-4429-8ccd-b19cf050901c","html_url":"https://github.com/metal-stack/builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metal-stack","download_url":"https://codeload.github.com/metal-stack/builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224270120,"owners_count":17283686,"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","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":["dockerfile","golang"],"created_at":"2024-11-12T12:17:56.680Z","updated_at":"2024-11-12T12:17:57.920Z","avatar_url":"https://github.com/metal-stack.png","language":"Makefile","readme":"# Common Builder\n\n## Makefile\n\nUse this repository in your Makefile by including it:\n\n```Makefile\nBINARY := metal-api\nMAINMODULE := \u003cyour package\u003e\nCOMMONDIR := $(or ${COMMONDIR},../../common)\n\ninclude $(COMMONDIR)/Makefile.inc\n\nrelease:: all ;\n```\n\nYou have to:\n\n- specify the `BINARY` name. This will be the generated binary, it will be placed in the `bin` folder.\n- specify the `MAINMODULE` path. This path should point to the folder of your `main.go`\n- specify the `COMMONDIR` is the directory where this repository is located. you *MUST* evaluate if\n  there is an environment variable `COMMONDIR` and use this one, so that our CI server\n  and multistage builds can set this path to another location than on your local pc.\n- overwrite the `release` target (note the two colons after the target name). Normally you should set\n  this to the `all` which compiles your go code. But sometimes you want to do something before compiling\n  (generate code, etc.).\n\nNow you can simply `make` to build a binary\n\n## Dockerfile for builder\n\nYou can use the image as a base builder image in your own Dockerfile:\n\n```Dockerfile\nFROM metalstack/builder:latest as builder\n```\n\nThis base image wants you to have a `go.mod` and a `Makefile` where the default target\ncreates the binary. This binary will be located in the path `/work/bin/...`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal-stack%2Fbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetal-stack%2Fbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal-stack%2Fbuilder/lists"}