Containerizing things.

This commit is contained in:
Colin 2024-06-12 16:22:41 -04:00
parent 42bee83cf5
commit e83dafc8bf
1 changed files with 8 additions and 5 deletions
docker/reporter

View File

@ -22,12 +22,15 @@ COPY --from=builder /usr/local/bin/oculus_filter /usr/local/bin/oculus_filter
# Change ownership of the binaries to the unprivileged user
RUN chown oculus:oculus /usr/local/bin/go-glitch /usr/local/bin/oculus_main /usr/local/bin/oculus_filter
# Create the diffs directory and set the appropriate permissions
RUN mkdir /diffs && chown oculus:oculus /diffs
# Create the logs directory, set it as a volume, and set the appropriate permissions
RUN mkdir /logs && chown oculus:oculus /logs
VOLUME /logs
# Set the working directory and change its ownership
WORKDIR /home/oculus
RUN chown oculus:oculus /home/oculus
# Set the working directory to /logs
WORKDIR /logs
# Create the diffs directory within /logs
RUN mkdir /logs/diffs && chown oculus:oculus /logs/diffs
# Switch to the unprivileged user
USER oculus