File tree 4 files changed +17
-6
lines changed
4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ .cache
2
+ go
Original file line number Diff line number Diff line change 1
1
* .o
2
2
* .pb.go
3
- .idea
3
+ .cache
4
+ /.idea
5
+ /go
4
6
otel-profiling-agent
5
7
tracer.ebpf
6
8
tracer.ebpf.arm64
Original file line number Diff line number Diff line change 33
33
&& find "$INSTALL_DIR/include" -type f -exec chmod +r {} \; \
34
34
&& rm "$PB_FILE"
35
35
36
+ # The docker image is built as root - make binaries available to user.
37
+ RUN mv /root/go/bin/* /usr/local/bin/
38
+
39
+ ENV GOPATH=/agent/go
40
+ ENV GOCACHE=/agent/.cache
41
+
36
42
RUN echo "export PATH=\"\$ PATH:\$ (go env GOPATH)/bin\" " >> ~/.bashrc
37
43
38
44
ENTRYPOINT ["/bin/bash" , "-l" , "-c" ]
Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ all: generate ebpf binary
6
6
7
7
# Removes the go build cache and binaries in the current project
8
8
clean :
9
- go clean -cache -i
10
- $(MAKE ) -C support/ebpf clean
11
- rm -f build-targets/* .{deb,rpm}
12
- rm -f support/* .test
9
+ @go clean -cache -i
10
+ @$(MAKE ) -s -C support/ebpf clean
11
+ @rm -f support/* .test
12
+ @chmod -Rf u+w go/ || true
13
+ @rm -rf go .cache
13
14
14
15
generate : protobuf
15
16
go install github.com/florianl/
[email protected]
@@ -57,7 +58,7 @@ docker-image:
57
58
docker build -t profiling-agent --build-arg arch=$(NATIVE_ARCH ) -f Dockerfile .
58
59
59
60
agent :
60
- docker run -v " $$ PWD" :/agent -it profiling-agent make
61
+ docker run -v " $$ PWD" :/agent -it --rm --user $( shell id -u) : $( shell id -g) profiling-agent make
61
62
62
63
legal :
63
64
@go install go.elastic.co/go-licence-detector@latest
You can’t perform that action at this time.
0 commit comments