Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set SHARKD_SOCKET to be usable by node user #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ekoyle
Copy link
Collaborator

@ekoyle ekoyle commented Aug 29, 2023

@@ -32,6 +32,7 @@ COPY --from=intermediate /out /out
RUN cd / && tar zxvf /out/sharkd.tar.gz && rm -rf /out/sharkd.tar.gz

ENV CAPTURES_PATH=/captures/
ENV SHARKD_SOCKET=/home/node/sharkd.sock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a good degree of success placing the SHARKD_SOCKET within the CAPTURES_PATH since its pretty much guaranteed to be available, writeable and exclusive regardless of the container build or username. thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose this one because it exists in the node:20-bookworm container we are building off of and is writable by the default node user that I set the docker container to run as. I am not opposed to putting it somewhere else.

I do have a concern with /captures/, as if that directory were shared between multiple instances, we could either delete a socket or use a sharkd instance that belongs to another container. We could also have problems in the unlikely event that /capture/ ends up on a mountpoint that doesn't support unix sockets (NFS, CIFS, FAT, NTFS, ...).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker example command broken
2 participants