Makefile hardcodes a personal remote DOCKER_HOST, breaking make docker for everyone else
#44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the repo-standards audit. Present on
mainand the pending lint branch.Problem
Makefile:2::=assigns unconditionally, overriding any inheritedDOCKER_HOST. Consequences:make dockersilently targets one specific machine on a private LAN, over SSH as root, for every user of this repo.script/cibuild, fails with an unresolvable host and an error that gives no hint why.Policy: "Simple projects should be configured with environment variables", and the Makefile is meant to be "authoritative documentation for how the repo is used". A hardcoded personal host is neither.
Two smaller Makefile defects while in the same file:
Missing
.PHONYentries. The list coversdefault bootstrap setup test lint fmt fmt-check check docker hooks vetbut omitsbuild,clean,install, anddocker-run.buildis the live risk: theDockerfilerunsmake buildat line 31, and a file or directory namedbuildin the repo root would make the target a silent no-op, producing an image with a stale or missing binary.Targets that bypass
script/. The nine policy-named targets are correct thin shims, butbuildrunsgo buildinline, andvet,clean,install,docker-runinvoke tooling directly.buildmatters most because the Dockerfile depends on it, so real build logic lives in the Makefile rather than inscript/where policy puts it.vetis also redundant —script/testalready runsgo vetfirst.Definition of done
DOCKER_HOSTis no longer unconditionally assigned. Either remove the line entirely, or make it opt-in and overridable with?=and an empty default.make dockerworks on a stock local Docker installation with no environment setup..PHONYincludesbuild,clean,install, anddocker-run.script/buildexists as a POSIX sh entrypoint following the conventions of the other scripts (#!/bin/sh,set -eu, the repo-rootcdidiom), andbuild:becomes a thin shim to it.Dockerfilestill builds successfully with the reworkedbuildtarget.vettarget is removed, or kept with a one-line comment saying why it earns its place.make checkgreen.TODO.mdupdated in the same commit.Implementation requirements
script/buildmust still produce a binary with the version string populated — build it and run the version command to confirm, since nothing in the test suite covers this.DOCKER_HOSTline would disrupt your own workflow, the?=form plus a line in the README noting it can be set in the environment is the better option — but the default must be a working local build.