Repository navigation
Description
Problem or Motivation
The devtools image has no mise command. The Dockerfile mounts mise from the mise image for the build only: "Only the build uses mise: the image has no mise command." Two repositories need the command in the devcontainer:
- dan-petty/infra: the pre-commit hook of
.pre-commit-config.yamlhas the entrymise exec -- scripts/private-data-scan.sh git --pre-commit --staged. Its README (Tools) and rule 7 of its AGENTS.md say to runmise install --lockedwithMISE_DATA_DIRin~/.cache/infra-tools/mise. - dan-petty/homelab pins
jdx/misein the same way.
In the devcontainer that was rebuilt on 2026-11-26 (devtools 1.2.2), command -v mise finds nothing. ~/.cache/infra-tools/mise/ holds downloads, installs and shims, and no mise binary, so a commit in infra stops at the hook. Before the rebuild, a stand-in script of 101 bytes at ~/.local/bin/mise (written 2026-11-24) ran the command after mise exec -- with the tools of PATH. That ignores the pins of mise.toml.
Owner direction of 2026-11-26: the devtools image installs the tools, and PATH gives each user of the container the intended versions.
Proposed Solution
Disposition: change the code.
- Copy the
misebinary of the pinned build stage (jdxcode/mise:<tag>@<digest>, which Renovate moves) into the final image at/usr/local/bin/mise. - Set
MISE_USE_VERSIONS_HOST_TRACK=0in the environment of the image, as the build stage does, so that no user sends the tracking request. test/tools.shchecksmise --version, and the comment and the documents no longer say that the image has no mise command.
Proof: in a container of the image, mise --version prints the pinned version. In a clone of infra, mise install --locked and the pre-commit hook pass.
Existing Tool Considered
mise (jdx/mise), which the image already pins for its build. The alternative is that each repository installs mise in a home folder. That puts a second copy on PATH for one user, which the owner direction excludes.
Proposed design
Problem statement
The devtools image has no mise command: only the build stage uses mise, so a devcontainer of the image cannot run the mise exec -- scripts/private-data-scan.sh git --pre-commit --staged hook of dan-petty/infra or the pinned tools of infra and homelab, and the 101-byte stand-in script at ~/.local/bin/mise ignores the pins of mise.toml. The image must provide the pinned mise binary at /usr/local/bin/mise, stop the mise version-tracking requests of its users, and keep test/tools.sh and the documents in step with the new command.
Acceptance criteria
Requirement: Image provides the mise command
The last stage of the Dockerfile SHALL copy the mise binary of the pinned jdxcode/mise stage to /usr/local/bin/mise.
Scenario: mise version in the built image
- WHEN
docker run --rm devtools:test mise --versionruns on the image that the change builds - THEN the command prints the version of the tag that the
jdxcode/miseline of theDockerfilepins and exits 0.
Requirement: Image stops mise version tracking
The last stage of the Dockerfile MUST set MISE_USE_VERSIONS_HOST_TRACK to 0 in the environment of the image.
Scenario: tracking variable in the built image
- WHEN
docker run --rm devtools:test printenv MISE_USE_VERSIONS_HOST_TRACKruns on the image that the change builds - THEN the command prints
0and exits 0.
Requirement: Tools test runs the mise command
test/tools.sh SHALL run mise --version with the other tools of the image.
Scenario: mise in the tools test
- WHEN the CI runs
docker buildx build --build-arg DEVTOOLS=devtools:test --file test/tools.Dockerfile teston the image of the change - THEN the build passes, the script prints the mise version, and it prints no
FAILline for mise.
Requirement: Tools test has no absence check
test/tools.sh MUST NOT assert that the mise command is absent.
Scenario: old absence check
- WHEN
grep -n 'command -v mise' test/tools.shruns - THEN the command finds no match and exits 1.
Requirement: Documents name the mise command
README.md, the header comment of the Dockerfile and the comment of test/tools.sh MUST NOT state that mise is build only or absent, and README.md SHALL name the pinned mise image as the source of the mise command.
Scenario: stale build-only text
- WHEN
grep -n 'no mise command' README.md Dockerfileandgrep -n 'build only' test/tools.shrun - THEN each command finds no match and exits 1.
Requirement: Pending a person after the merge
After the release, a person SHALL prove the mise of the image in a devcontainer of dan-petty/infra.
Scenario: infra pre-commit hook in the rebuilt devcontainer
- WHEN a person removes the stand-in
~/.local/bin/mise, rebuilds the devcontainer on the released image, and runsmise install --lockedwithMISE_DATA_DIR=~/.cache/infra-tools/misein a clone ofdan-petty/infra - THEN
command -v miseprints/usr/local/bin/mise,mise install --lockedexits 0, and a staged commit runsmise exec -- scripts/private-data-scan.sh git --pre-commit --stagedwith exit 0.
Existing Tool Considered
Existing Tool Considered: mise (jdx/mise) is the open, maintained tool that covers the need, and no alternatives check is needed. The image already pins its official image at a digest (Dockerfile:13), and Renovate updates that pin with its dockerfile manager (.github/renovate.json:5). What mise lacks for this need is a way to put its own binary into another image: the official image holds the binary at /usr/local/bin/mise (Dockerfile:29), and mise's install script writes a per-user copy under ~/.local/bin, which the owner direction of 2026-11-26 excludes. The proposal therefore copies the binary from the pinned mise stage into the last stage, as the last stage already does for uv and uvx (Dockerfile:136), and builds no code: nothing to keep and nothing to fix until it matches the tool. It also sets MISE_USE_VERSIONS_HOST_TRACK=0 in the last stage (Dockerfile:28), so a user's mise install sends no version-tracking request.
Key questions
- How does the final image get the mise binary?: The last stage adds
COPY --from=mise /usr/local/bin/mise /usr/local/bin/mise. Themisestage pins the official image at a digest, the binary is at/usr/local/bin/misein that image, and the last stage already copies a binary from a pinned stage this way for uv and uvx. Renovate'sdockerfilemanager moves the pin, so no version is copied into code. (best practice) [sources: .github/renovate.json:5]- Chosen: Copy from the pinned mise stage. The pin already exists at a digest, Renovate updates it, and the last stage already copies uv and uvx from their pinned stages, so the change adds no download and no version in code.
- Rejected: Copy from the mise-tools stage. That stage mounts mise from the mise image only for its
RUNand keeps no layer with mise (Dockerfile:21,Dockerfile:22), so it has no binary to copy. - Rejected: Run the mise install script in the last stage. This adds a network download to each build and a version source that Renovate does not update, and it installs into a home folder rather than
/usr/local/bin. - Rejected: Let each repository install mise in a home folder. This puts a second copy on
PATHfor one user and contradicts the owner direction of 2026-11-26.
- Does the final image set MISE_USE_VERSIONS_HOST_TRACK?: Yes: the last stage adds
MISE_USE_VERSIONS_HOST_TRACK=0to itsENVblock, as themise-toolsstage sets it. TheDockerfilerecords thatDO_NOT_TRACK, which the last stage already sets, does not stop the requests to mise-versions.jdx.dev and that this variable does. (proposed)- Chosen: Set it in the ENV block of the last stage. The build stage sets it for its own installs, and the
ENVblock of the last stage is where the image sets the telemetry and update variables that a consumer image inherits. - Rejected: Rely on
DO_NOT_TRACK=1only. The comment of theDockerfilesays thatDO_NOT_TRACKdoes not stop these requests. - Rejected: Set nothing. Each user's
mise installwould send a version-tracking request, which the issue excludes.
- Chosen: Set it in the ENV block of the last stage. The build stage sets it for its own installs, and the
- Does the final image set MISE_DATA_DIR for its users?: No. The
mise-toolsstage exportsMISE_DATA_DIR=/tmp/miseonly for its own install and removes that folder in the same layer, so nothing of it reaches the last stage. The last stage leaves the variable unset, so the value that a consumer sets applies, and infra sets~/.cache/infra-tools/mise. (proposed)- Chosen: Leave
MISE_DATA_DIRunset. The build-stage value is a shared, ephemeral path that the build removes, and a value in the image would override the per-user value that infra sets. - Rejected: Set
MISE_DATA_DIR=/tmp/mise. The path is shared and ephemeral, and it overrides the value that infra sets for its pinned tools.
- Chosen: Leave
- How does test/tools.sh change?: The script gains
run mise --versionin the group of tools that it runs, and it drops the comment# mise is a tool of the build only.with the! command -v misecheck. The CI runs the script in the image with--network=none, so the CI run of the change is the proof that the version check needs no network. (best practice) [sources: test/tools.sh:60, test/tools.sh:117, test/tools.Dockerfile:11, .github/workflows/image.yml:166]- Chosen: Add
run mise --versionand drop the absence check. The script already runs each tool of the image once and then checks the state of the image, so the new command fits its first part and the absence check leaves. - Rejected: Add a new test script. This duplicates the image test runner and adds a file for one command.
- Rejected: Check by hand only. A manual check does not fail when the command disappears from a later image.
- Chosen: Add
- Which texts state that mise is build only or absent?: The header of the
DockerfilesaysOnly the build uses mise: the image has no mise command;test/tools.shhas the comment# mise is a tool of the build only.; andREADME.mdsaysThe build stops the install-tracking requests of mise,the image has no mise command, andthe image has nomisecommand. All of them change in the same pull request, and the README names the mise image as the source of the command, as it does for uv. [sources: test/tools.sh:117, README.md:34, README.md:88, README.md:122]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
The missing mise binary blocks pre-commit hooks in dan-petty/infra and forces a workaround script, increasing friction for developers on each commit.Both deal with mise in the devtools image, but #20 stops telemetry during the build stage while the candidate makes the mise binary available to users of the final image.devops-cli-service commentedon Nov 26, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
chore(main): release 1.2.4 (#93)
devops-cli-service commentedon Nov 26, 2026
Released in v1.2.4: https://github.com/dan-petty/devtools/releases/tag/v1.2.4