papibot/Dockerfile.runtime

17 lines
490 B
Docker
Raw Normal View History

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