Skip to content

Base image: git needs safe.directory and an identity; optional arm64 base #13

Description

@matt-wright-dev

Two base image items found while using the library from a consumer project.

Git does not work in the workspace without workarounds

Any "commit your change" task fails today. The bind mount root /workspace is owned by root while its contents belong to the host user, so git refuses the repo ("dubious ownership"). There is also no git identity in the image.

How we saw it: with both workarounds spelled out in the prompt, the task succeeds but costs the agent an extra turn and about 60% more than a comparable task.

Suggested fix: write /etc/gitconfig in docker/base/Dockerfile with [safe] directory = * and a default identity such as agent-gwt <agent@agent-gwt.local>. Both agent images inherit it. Tests that want commits attributed differently can seed their own config.

Size: small.

Optional native arm64 base (decision needed)

The official archlinux image is x86_64 only, so Apple Silicon users build and run under emulation. Native arm64 works end to end with menci/archlinuxarm (builds about 1.8x faster), but that is the only live multi-arch Arch image and it is one person's unsigned build.

Suggested fix, if wanted: ARG BASE_IMAGE=archlinux:latest / FROM ${BASE_IMAGE} in the base Dockerfile with an opt-in for arm64 hosts, pinned by digest, and a loud notice when a non-official base is used. amd64 users stay on the official image.

Size: medium, and mostly a trust decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions