{"id":40870213,"url":"https://github.com/crypto-zero/container","last_synced_at":"2026-01-22T00:39:22.146Z","repository":{"id":262629297,"uuid":"883075361","full_name":"crypto-zero/container","owner":"crypto-zero","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-11T07:47:56.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-12T03:27:12.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crypto-zero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-04T10:33:54.000Z","updated_at":"2025-12-11T07:47:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cbb1710-2a4b-473f-a2c1-d4f5f0e0cc58","html_url":"https://github.com/crypto-zero/container","commit_stats":null,"previous_names":["crypto-zero/container"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crypto-zero/container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-zero%2Fcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-zero%2Fcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-zero%2Fcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-zero%2Fcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crypto-zero","download_url":"https://codeload.github.com/crypto-zero/container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-zero%2Fcontainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28648460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-22T00:39:22.080Z","updated_at":"2026-01-22T00:39:22.138Z","avatar_url":"https://github.com/crypto-zero.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Container Images\n\nDocker images for building and running Go applications.\n\n## Images\n\n### go-builder\nBuild environment image with complete compilation toolchain.\n\n**Included Tools**:\n- Go compiler\n- make, gcc, g++\n- git, openssh-client\n- docker, docker-cli-buildx\n- curl, binutils-gold\n- build-base, musl-dev\n\n### go-runtime\nRuntime image for Go applications, smaller size for deployment.\n\n**Included Tools**:\n- Go runtime\n- gops (Go process diagnostics tool)\n- Common utilities: curl, jq, gzip, bind-tools\n- Network tools: proxychains-ng\n- Timezone and certificate support\n\n## Automated Builds\n\nThis project uses GitHub Actions to automatically build and publish images.\n\n### Workflow Features\n\n- **Automatic Version Detection**: Checks for the latest Go version from `go.dev`\n- **Smart Building**: Only builds if the version doesn't exist in the registry\n- **Multi-Architecture**: Builds for `linux/amd64` and `linux/arm64`\n- **Daily Schedule**: Runs daily at 00:00 UTC\n- **Manual Trigger**: Can be triggered manually via workflow_dispatch\n\n### Image Tags\n\nImages are published to GitHub Container Registry:\n\n```\nghcr.io/\u003cyour-username\u003e/go-builder:v1.23.4\nghcr.io/\u003cyour-username\u003e/go-runtime:v1.23.4\n```\n\n### Usage\n\nPull and use the images:\n\n```bash\n# For building\nFROM ghcr.io/\u003cyour-username\u003e/go-builder:v1.23.4 AS builder\nWORKDIR /build\nCOPY . .\nRUN go build -o app\n\n# For runtime\nFROM ghcr.io/\u003cyour-username\u003e/go-runtime:v1.23.4\nCOPY --from=builder /build/app /app/bin/app\nENV PROJECT_NAME=app\n```\n\n## Environment Variables\n\n### go-runtime\n\n- `TZ`: Set timezone (e.g. `Asia/Shanghai`)\n- `CI_BUILD_INFO`: Build information\n- `PROJECT_NAME`: Project executable name (required)\n\n## Manual Build (Optional)\n\nIf you need to build locally for testing:\n\n```bash\n# Get the latest Go version first\nLATEST_GO_VERSION=$(curl -s 'https://go.dev/VERSION?m=text' | head -n 1 | cut -c 3-)\n\n# Build go-builder\ndocker build --build-arg VERSION=${LATEST_GO_VERSION} -t go-builder:${LATEST_GO_VERSION} ./go-builder\n\n# Build go-runtime\ndocker build --build-arg VERSION=${LATEST_GO_VERSION} -t go-runtime:${LATEST_GO_VERSION} ./go-runtime\n\n# Multi-architecture build\ndocker buildx build --platform linux/amd64,linux/arm64 \\\n  --build-arg VERSION=${LATEST_GO_VERSION} \\\n  -t your-registry/go-builder:${LATEST_GO_VERSION} \\\n  --push \\\n  ./go-builder\n```\n\n## Notes\n\n1. **Version Strategy**: \n   - Dockerfiles do **not** have a default version - builds require explicit version specification\n   - GitHub Actions automatically detects and builds with the latest Go version\n   - **Local builds must specify `--build-arg VERSION=x.y.z`** - builds will fail without this parameter\n   - This design forces version awareness and prevents accidentally using outdated versions\n\n2. Images are based on Alpine Linux 3.23 (small size, uses musl libc, pinned for stability)\n\n3. go-runtime requires `PROJECT_NAME` environment variable pointing to the executable\n\n4. Both images support multi-architecture (amd64/arm64)\n\n5. **go-runtime design**: Uses pure `alpine:3.23` as base (not `golang:alpine`) for minimal runtime size (~50MB vs ~400MB)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-zero%2Fcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrypto-zero%2Fcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-zero%2Fcontainer/lists"}