Skip to content

Commit

Permalink
Update Dockerfile.tmpl
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall authored Aug 27, 2024
1 parent 23ed415 commit 8a33f6c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions go/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,14 @@ RUN ldd --version

WORKDIR /
RUN mkdir -p /root/.config/go/telemetry && echo "off 2024-08-23" > /root/.config/go/telemetry/mode
RUN echo "#!/bin/bash\n" \
"if [ \"\$1\" = \"/usr/local/go/pkg/tool/linux_amd64/compile\" ]; then echo \"compile version go1.23.0\" && exit 0; fi\n" \
"if [ -z \"\$1\" ]; then echo \"compile version go1.23.0\" && exit 0; fi\n" \
"if [ -n \"\$1\" ]; then exec \"\$@\" && exit 0; fi\n" > /root/toolexec.sh
RUN chmod +x /root/toolexec.sh && chmod 777 /root/toolexec.sh
RUN cat /root/toolexec.sh | echo
RUN go version \
&& go mod init github.com/elastic/golang-crossbuild \
&& echo ">>> run go get -d" \
&& go get -d . \
&& echo ">>> run go build" \
&& go env \
&& echo "toolcompile=$(go tool compile -V)" \
&& CGO_ENABLED=0 go build -toolexec="/root/toolexec.sh" -o /crossbuild /entrypoint.go \
&& CGO_ENABLED=0 go build -o /crossbuild /entrypoint.go \
&& rm -rf /go/* /root/.cache/* /entrypoint.go

RUN curl -sSLO https://storage.googleapis.com/obs-ci-cache/beats/libpcap-1.8.1.tar.gz \
Expand Down

0 comments on commit 8a33f6c

Please sign in to comment.