Correct docker build#49
Open
vaygr wants to merge 1 commit into
Open
Conversation
Member
|
Thanks this is appreciated! Unfortunately the node-webshark releases are far behind (devs fault) so we need to address that ahead of merging this and pin to a proper full featured and tested release if we want to pin. The current one would include old bugs. |
Author
|
@lmangani node-webshark is probably less critical, so I can adjust it to just wireshark. But if the release is expected fairly soon, addressing a broken build could wait a bit. |
|
I was able to build by only pinning the wireshark version to v4.4.6 and keeping the old config done on line 10 and 40 original. Example: FROM node:20-bookworm as intermediate
RUN apt-get update && apt-get install -y \
git sed wget unzip make python3 cmake flex bison libglib2.0-dev libgcrypt20-dev libspeex-dev libspeexdsp-dev libc-ares-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /out /usr/src /var/run
WORKDIR /usr/src
RUN git clone --depth=1 https://github.com/qxip/node-webshark.git /usr/src/node-webshark
RUN git clone --depth 1 --branch v4.4.6 https://gitlab.com/wireshark/wireshark.git /usr/src/wireshark
WORKDIR /usr/src/wireshark
RUN ../node-webshark/sharkd/build.sh
WORKDIR /usr/src
RUN mkdir web \
&& cd web \
&& wget github.com/qxip/webshark-ui/releases/latest/download/latest.zip \
&& unzip latest.zip \
&& rm -rf latest.zip \
&& sed -i 's|href="/"|href="/webshark/"|g' index.html
FROM node:20-bookworm-slim
RUN apt update \
&& apt install -y git libglib2.0-0 speex libspeex1 libspeexdsp1 libc-ares2 libxml2 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /captures /usr/local/bin /usr/local/share/wireshark/ \
&& chown -R node: /captures
COPY --from=intermediate /usr/src/wireshark/build/run/sharkd /usr/local/bin/sharkd
COPY --from=intermediate /usr/src/wireshark/build/run/colorfilters /usr/local/share/wireshark/colorfilters
ENV CAPTURES_PATH=/captures/
ENV SHARKD_SOCKET=/captures/sharkd.sock
COPY --chown=node . /usr/src/node-webshark
COPY --from=intermediate /usr/src/web /usr/src/node-webshark/web
VOLUME /captures
WORKDIR /usr/src/node-webshark/api
RUN npm install
EXPOSE 8085
ENTRYPOINT [ "/usr/src/node-webshark/entrypoint.sh" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes 2 things:
/usr/src/node-webshark. It must be copied from the intermediary image.