anchor.diff:  # so can clone the private mtconnect cppagent_dev repo.
   # keep it out of the github repo with .gitignore.
   # this sets up a file with the contents accessible at /run/secrete/access_token.
  -# see below at 
  -#   git clone https://$(cat /run/secrets/access_token)@github.com...
  +# use as below with
  +#   RUN --mount=type=secret,id=access_token \
  +#     git clone https://$(cat /run/secrets/access_token)@github.com...
   
   # ---------------------------------------------------------------------
   # os
  
positive.code: CMD /usr/bin/ruby /etc/mtconnect/simulator/run_scenario.rb -l \
    /etc/mtconnect/simulator/VMC-3Axis-Log.txt & \
    cd /etc/mtconnect/simulator && agent debug agent.cfg
  
negative.code: # install ruby for simulator
  RUN apt-get update && apt-get install -y ruby
  
  # change to a new non-root user for better security.
  # this also adds the user to a group with the same name.
  # --create-home creates a home folder, ie /home/<username>
  RUN useradd --create-home agent
  USER agent
  
  # install agent executable
  COPY --chown=agent:agent --from=build /root/agent/build/bin/agent /usr/local/bin/
  
  # copy data to /etc/mtconnect
  COPY --chown=agent:agent --from=build /root/agent/schemas /etc/mtconnect/schemas
  COPY --chown=agent:agent --from=build /root/agent/simulator /etc/mtconnect/simulator
  COPY --chown=agent:agent --from=build /root/agent/styles /etc/mtconnect/styles
  
  # expose port
  EXPOSE 5000
  
  WORKDIR /home/agent
  
  # default command - can override with docker run or docker-compose command.
  # this runs the adapter simulator and the agent using the sample config file.
  