FROM www.gitgud.foo/thegrind/papibot-builder:latest as build # Create a group and user 'papibot' RUN groupadd -r papibot && useradd -r -g papibot papibot # Switch to the 'papibot' user USER papibot # Copy the necessary files from the build stage COPY --from=build --chown=papibot:papibot /usr/bin/ /usr/bin COPY --from=build --chown=papibot:papibot /app/ /app/ # Set the working directory to /app WORKDIR /app/ # Set the entry point to the built Go application ENTRYPOINT ["./papibot"]