anchor.diff: -FROM clojure:openjdk-11-lein-2.9.8
  -
  -RUN useradd -m -r -g root {{name}}
  +FROM public.ecr.aws/docker/library/clojure:openjdk-11-lein AS build
   
   RUN mkdir -p /usr/src/{{name}}
   
  
positive.code: 
  ## Add files changing less often first for fetching dependencies as a Docker
  ## build cache optimization.
  {{#datomic?}}
  COPY profiles.clj /usr/src/{{name}}/
  {{/datomic?}}
  COPY project.clj /usr/src/{{name}}/
  
  {{#datomic?}}
  ARG DATOMIC_USERNAME
  ARG DATOMIC_PASSWORD
  {{/datomic?}}
  
  RUN lein deps
  
  
negative.code: 
  RUN lein do test, uberjar
  
  FROM public.ecr.aws/docker/library/openjdk:11-jre
  
  RUN useradd -m -r -g root {{name}}
  
  RUN mkdir -p /srv/{{name}}/target
  
  ## Copy the uberjar from the build image.
  COPY --from=build /usr/src/{{name}}/target/{{name}}.jar /srv/{{name}}/target/
  
  COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
  
  WORKDIR /srv/{{name}}
  
  ## Drop privileges.
  USER {{name}}
  