anchor.diff:  # NOTE: this Dockerfile is purely for local development! it is *not* used for
   # the official 'concourse/concourse' image.
   
  -FROM concourse/dev
  -
  +FROM concourse/dev AS base
   
   # download go modules separately so this doesn't re-run on every change
   WORKDIR /src
  
positive.code: COPY go.sum .
  RUN grep '^replace' go.mod || go mod download
  
  # build Concourse without using 'packr' and set up a volume so the web assets
  # live-update
  COPY . .
  RUN go build -gcflags=all="-N -l" -o /usr/local/concourse/bin/concourse \
        ./cmd/concourse
  
negative.code:       go build --tags 'netgo osusergo' -a -ldflags '-extldflags "-static"' -o /tmp/fly ./fly && \
        tar -C /tmp -czf /usr/local/concourse/fly-assets/fly-$(go env GOOS)-$(go env GOARCH).tgz fly && \
        rm /tmp/fly
  
  # build the init executable for containerd
  RUN gcc -O2 -static -o /usr/local/concourse/bin/init ./cmd/init/init.c
  
  
  # extend base stage with setup for local docker-compose workflow
  FROM base
  
  # set up a volume so locally built web UI changes auto-propagate
  VOLUME /src
  
  # generate keys (with 1024 bits just so they generate faster)
  RUN mkdir -p /concourse-keys
  