Giter VIP home page Giter VIP logo

Comments (6)

maximsapiens avatar maximsapiens commented on August 25, 2024 5

I made it works in this way, by modifying captainkube Dockerfile, like as follows below:

# Build
FROM golang:1.13.4 as builder

WORKDIR /build
COPY main.go .
RUN GO111MODULE=on; go mod init captainkube && go get k8s.io/[email protected] && go get -d -v
# temporary workaroud for https://github.com/Azure/phippyandfriends/issues/30
#RUN cd $GOPATH/src/k8s.io/klog && git checkout v0.4.0 && cd -
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .

# Run
FROM alpine:latest  

RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /build/app .
CMD ["./app"]

So, if briefly, change this line:
RUN GO111MODULE=on; go mod init captainkube && go get k8s.io/[email protected] && go get -d -v
And comment out this line:
#RUN cd $GOPATH/src/k8s.io/klog && git checkout v0.4.0 && cd -
Thats all.

from phippyandfriends.

howardjones avatar howardjones commented on August 25, 2024 1

How do you specify a version in an import?
I tried adding go get k8s.io/[email protected] before the existing go get in the Dockerfile, but I get cannot use path@version syntax in GOPATH mode.
I'm not a go person, but this seemed to be related to using a different structure for the libraries.

from phippyandfriends.

mathieu-benoit avatar mathieu-benoit commented on August 25, 2024 1

Thanks @maximsapiens, you got it! That's indeed fix the issue accordingly. And yes you are right we could now remove the temporary workaround we did there: #31.

Thanks for your contribution on this @maximsapiens, @soccerjoshj07 and @howardjones!

from phippyandfriends.

mathieu-benoit avatar mathieu-benoit commented on August 25, 2024

Not sure if it's directly related but just found this: google/gnostic#155

from phippyandfriends.

mathieu-benoit avatar mathieu-benoit commented on August 25, 2024

Definitely looks like related to this: kubernetes/client-go#741

from phippyandfriends.

joshjohanning avatar joshjohanning commented on August 25, 2024

I think if/when this pull request is approved, this should help us out. kubernetes/kubernetes#87802

edit-nvm

from phippyandfriends.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.