Skip to content

Commit

Permalink
Merge pull request opensearch-project#26 from parca-dev/dockerfiledev
Browse files Browse the repository at this point in the history
Add Dockerfile.dev for Tilt
  • Loading branch information
kakkoyun authored Sep 13, 2021
2 parents 6410263 + 065de07 commit 62dec5a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Equivalent of docker.io/golang:1.16.5-buster on June 24 2021
FROM docker.io/golang@sha256:ff1931f625a79c1030d01979d8a70fa31a78d3827a69fc48f403cd5d8dbf9861 as build
ARG TOKEN

RUN echo "\
deb http://snapshot.debian.org/archive/debian/20210621T000000Z buster main\n\
deb http://snapshot.debian.org/archive/debian-security/20210621T000000Z buster/updates main\n\
deb http://snapshot.debian.org/archive/debian/20210621T000000Z buster-updates main\n\
deb http://snapshot.debian.org/archive/debian/20210621T000000Z buster-backports main\
" > /etc/apt/sources.list

# NOTICE: -o Acquire::Check-Valid-Until="false" added as a mitigation, see https://github.com/parca-dev/parca-agent/issues/10 for further details.
RUN apt-get -o Acquire::Check-Valid-Until="false" update -y && apt-get install -y clang-11 make gcc coreutils elfutils binutils zlib1g-dev libelf-dev ca-certificates netbase && \
ln -s /usr/bin/clang-11 /usr/bin/clang && \
ln -s /usr/bin/llc-11 /usr/bin/llc
WORKDIR /parca-agent

RUN go env -w GOPRIVATE=github.com/parca-dev && git config --global url."https://parca:${TOKEN}@github.com".insteadOf "https://github.com"
COPY go.mod go.sum /parca-agent/
RUN go mod download -modcacherw

COPY parca-agent.bpf.c vmlinux.h Makefile /parca-agent/
COPY ./3rdparty /parca-agent/3rdparty
RUN make bpf

COPY . /parca-agent
RUN make build

# TODO(kakkoyun): Add Delve

RUN cp /parca-agent/dist/parca-agent /bin/parca-agent

CMD ["/bin/parca-agent"]

0 comments on commit 62dec5a

Please sign in to comment.