# Development image with Air hot reload # Build: docker build -f Dockerfile.dev -t atcr-dev . # Run: docker run -v $(pwd):/app -p 5000:5000 atcr-dev FROM mirror.gcr.io/library/golang:1.26.7-trixie ARG AIR_CONFIG=.air.toml # Extra Go build tags for Air's build command (comma-separated). docker-compose # passes `testmode` so the dev stack can resolve its loopback did:web # identities. Production images (Dockerfile.appview, Dockerfile.hold) never # set this and never carry the tag. ARG GO_TAGS="" ENV DEBIAN_FRONTEND=noninteractive ENV AIR_CONFIG=${AIR_CONFIG} ENV GO_TAGS=${GO_TAGS} RUN apt-get update && \ apt-get install -y --no-install-recommends sqlite3 libsqlite3-dev curl nodejs npm && \ rm -rf /var/lib/apt/lists/* && \ go install github.com/air-verse/air@latest WORKDIR /app # Copy go.mod first for layer caching COPY go.mod go.sum ./ RUN go mod download # For development: source mounted as volume, Air handles builds CMD ["sh", "-c", "air -c ${AIR_CONFIG}"]