Skip to content

Conversation

@ekoyle
Copy link
Collaborator

@ekoyle ekoyle commented Aug 29, 2023

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, ...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker example command broken

2 participants