elastic / apm-integration-testing

APM Integration Testing
Apache License 2.0
54 stars 68 forks source link

docker: apm-server image fails when building it #1553

Closed v1v closed 1 year ago

v1v commented 1 year ago

When running:

cd docker/apm-server
docker build .

It fails with

#13 559.3 # github.com/elastic/elastic-package/internal/registry
#13 559.3 /go/pkg/mod/github.com/elastic/elastic-package@v0.72.0/internal/registry/client.go:47:12: base.JoinPath undefined (type *url.URL has no field or method JoinPath)
#13 559.3 note: module requires Go 1.19
#13 565.6 # github.com/elastic/elastic-package/internal/kibana
#13 565.6 /go/pkg/mod/github.com/elastic/elastic-package@v0.72.0/internal/kibana/client.go:111:12: base.JoinPath undefined (type *url.URL has no field or method JoinPath)
#13 565.6 note: module requires Go 1.19
#13 597.8 make: *** [go.mk:43: /go/src/github.com/elastic/apm-server/build/linux/elastic-package] Error 2
#13 597.8 make: Leaving directory '/go/src/github.com/elastic/apm-server'

@elastic/apm-server , do you happen to know what's the reason? I tried to bump the version for the APM Server with same outcome

-ARG apm_server_base_image=docker.elastic.co/apm/apm-server:8.0.0-SNAPSHOT
+ARG apm_server_base_image=docker.elastic.co/apm/apm-server:8.6.0-SNAPSHOT
 ARG go_version=1.18.9
 ARG apm_server_binary=apm-server
v1v commented 1 year ago

I've just seen https://github.com/elastic/elastic-package/blob/main/.go-version#L1

maybe that's the reason for note: module requires Go 1.19

--- a/docker/apm-server/Dockerfile
+++ b/docker/apm-server/Dockerfile
@@ -1,5 +1,5 @@
-ARG apm_server_base_image=docker.elastic.co/apm/apm-server:8.0.0-SNAPSHOT
-ARG go_version=1.18.9
+ARG apm_server_base_image=docker.elastic.co/apm/apm-server:8.6.0-SNAPSHOT
+ARG go_version=1.19.5
 ARG apm_server_binary=apm-server

I'll try the above docker image

v1v commented 1 year ago

https://github.com/elastic/apm-integration-testing/pull/1554 should fix the issue