You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building the above function with s2i fails as below:
func run -b s2i --build -v
Building function image
Step 1/9 : FROM registry.access.redhat.com/ubi8/go-toolset
latest: Pulling from ubi8/go-toolset
Digest: sha256:6626052118c5fa2f8ff7dcf80508f4347a6dc0f00ed67a4674ebaed427fff82a
Status: Image is up to date for registry.access.redhat.com/ubi8/go-toolset:latest
---> e60e55932f56
Step 2/9 : LABEL "io.openshift.s2i.build.source-location"="/tmp/gofuncpkg" "io.k8s.display-name"="image-registry.openshift-image-registry.svc:5000/default/gofuncpkg:latest" "io.openshift.s2i.build.image"="registry.access.redhat.com/ubi8/go-toolset"
---> Running in 66b3cda8f0b4
---> 647c848504c2
Step 3/9 : USER root
---> Running in 1d9352b3b087
---> b9fa15fef877
Step 4/9 : COPY upload/scripts /tmp/scripts
---> 7c4e466dd814
Step 5/9 : COPY upload/src /tmp/src
---> b8f869a5d7be
Step 6/9 : RUN chown -R 1001:0 /tmp/scripts /tmp/src
---> Running in 29442f581e96
---> 581baef44613
Step 7/9 : USER 1001
---> Running in db76e4ab6e7e
---> ceceb8e18ac8
Step 8/9 : RUN /tmp/scripts/assemble
---> Running in 4343ca78d928
/tmp/src ~
/tmp/src/.s2i/builds/last /tmp/src ~
go: f imports
function/hello: package function/hello is not in std (/usr/lib/golang/src/function/hello)
Error: The command '/bin/sh -c /tmp/scripts/assemble' returned a non-zero code: 1
The function can be built and run properly using pack builder
[/tmp/gofuncpkg]$ func run -b pack --build
Building function image
Still building
Still building
Yes, still building
🙌 Function built: image-registry.openshift-image-registry.svc:5000/default/gofuncpkg:latest
Running on host port 35151
Initializing HTTP function
listening on http port 8080
^Z
[/tmp/gofuncpkg]$ http :8080
HTTP/1.1 200 OK
Content-Length: 10
Content-Type: text/plain; charset=utf-8
Date: Thu, 26 Sep 2024 13:13:47 GMT
Hello Jeff
The text was updated successfully, but these errors were encountered:
Go function project with packages fails to build with s2i builder, with error:
Sample Go function project structure (full source code https://github.com/jrangelramos/gofuncpkg):
handle.go
hello/hello.go
Building the above function with s2i fails as below:
The function can be built and run properly using pack builder
The text was updated successfully, but these errors were encountered: