Skip to content

Commit

Permalink
Update Dockerfile build stage w/ go1.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Apr 6, 2021
1 parent d57d5a2 commit dc83413
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
FROM ubuntu:18.04 AS build
RUN apt update && \
apt install -y --no-install-recommends libaio-dev libleveldb-dev libsnappy-dev \
g++ libcap2-bin libseccomp-dev golang git ca-certificates make sudo
RUN apt install -y --no-install-recommends jq openssl
ENV GOPATH=/stenographer
RUN go get github.com/google/stenographer
apt install -y --no-install-recommends libaio-dev libleveldb-dev libsnappy-dev libpcap-dev \
g++ libcap2-bin libseccomp-dev git ca-certificates make sudo jq openssl curl wget

RUN wget -P /tmp https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz && \
tar -C /usr/local -xzf /tmp/go1.11.5.linux-amd64.tar.gz && \
rm /tmp/go1.11.5.linux-amd64.tar.gz

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
ENV BINDIR=/opt/stenographer/bin
RUN mkdir -p ${BINDIR} && \
cd /stenographer/src/github.com/google/stenographer && \
cd /stenographer/src/github.com/qxip/stenographer && \
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:18.04
COPY --from=build /opt/stenographer/bin /usr/bin
COPY --from=build /etc/stenographer /etc/stenographer
COPY --from=build /stenographer/src/github.com/google/stenographer/stenotype/compile_bpf.sh /usr/bin/
COPY --from=build /stenographer/src/github.com/qxip/stenographer/stenotype/compile_bpf.sh /usr/bin/
COPY entrypoint.sh /usr/bin/

RUN adduser --system --no-create-home stenographer && \
Expand Down

0 comments on commit dc83413

Please sign in to comment.