Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Aug 26, 2024
1 parent e684ae2 commit dce8d79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ ENV GOPATH /stenographer
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

RUN go get github.com/qxip/stenographer
RUN git clone github.com/qxip/stenographer /stenographer/src
ENV BINDIR=/opt/stenographer/bin
RUN mkdir -p ${BINDIR} && \
cd /stenographer/src/github.com/qxip/stenographer && \
cd /stenographer/src && \
sed -i -e 's|/path/to|/var/lib/stenographer|' configs/steno.conf && \
( ./install.sh || true ) && \
sed -i -e 's/curl /curl -k /' /opt/stenographer/bin/stenocurl

FROM ubuntu:22.04
COPY --from=build /opt/stenographer/bin /usr/bin
COPY --from=build /etc/stenographer /etc/stenographer
COPY --from=build /stenographer/src/github.com/qxip/stenographer/stenotype/compile_bpf.sh /usr/bin/
COPY --from=build /stenographer/src/stenotype/compile_bpf.sh /usr/bin/
COPY entrypoint.sh /usr/bin/

RUN adduser --system --no-create-home stenographer && \
addgroup --system stenographer && \
mkdir -p /var/lib/stenographer && \
chown stenographer:stenographer /var/lib/stenographer && \
apt update && \
apt install -y --no-install-recommends libleveldb1v5 libsnappy1v5 libaio1 \
apt install -y --no-install-recommends libleveldb1d libsnappy1v5 libaio1 \
jq tcpdump libcap2-bin curl tshark ca-certificates sudo && \
setcap 'CAP_NET_RAW+ep CAP_NET_ADMIN+ep CAP_IPC_LOCK+ep' /usr/bin/stenotype && \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit dce8d79

Please sign in to comment.