Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go functions fails to build using S2I on Windows #2529

Closed
jrangelramos opened this issue Oct 1, 2024 · 0 comments · Fixed by #2535
Closed

Go functions fails to build using S2I on Windows #2529

jrangelramos opened this issue Oct 1, 2024 · 0 comments · Fixed by #2535

Comments

@jrangelramos
Copy link
Contributor

I'm unable to build a Go functions using S2I on a Windows machine.

The following error is reported during build process

PS C:\Users\hudson\git\kn-func-plugin\gofn> kn func 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.k8s.display-name"="image-registry.openshift-image-registry.svc:5000/default/gofn:latest"       "io.openshift.s2i.build.image"="registry.access.redhat.com/ubi8/go-toolset"       "io.openshift.s2i.build.source-location"="C:\\Users\\hudson\\git\\kn-func-plugin\\gofn"
 ---> Running in 9a3d32509e72
 ---> 9a99ce0a2fd2
Step 3/9 : USER root
 ---> Running in 7079d10d11b2
 ---> e4447d999d92
Step 4/9 : COPY upload/scripts /tmp/scripts
 ---> 70f69f38ab44
Step 5/9 : COPY upload/src /tmp/src
 ---> a399a11f43a1
Step 6/9 : RUN chown -R 1001:0 /tmp/scripts /tmp/src
 ---> Running in 182aa2564376
 ---> 65fa340dbd62
Step 7/9 : USER 1001
 ---> Running in 1e09dae6590d
 ---> f23dfd3ea3af
Step 8/9 : RUN /tmp/scripts/assemble
 ---> Running in ab2e96c4e0b4
/tmp/src ~
/tmp/src/.s2i/builds/last /tmp/src ~
go: f@v0.0.0-00010101000000-000000000000 (replaced by ./f): reading f/go.mod: open /tmp/src/.s2i/builds/last/f/go.mod: no such file or directory
Error: The command '/bin/sh -c /tmp/scripts/assemble' returned a non-zero code: 1 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant