forked from opensearch-project/observability
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request opensearch-project#26 from parca-dev/dockerfiledev
Add Dockerfile.dev for Tilt
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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"] |