Closed koolshanthan closed 4 years ago
hello, it's hard to tell what's going on without seeing the whole Dockerfile, but you can try to run it like that:
go get -u github.com/vadimi/go-http-ntlm/v2
to get version 2.x
If it doesn't work please post your Dockerfile contents
Hi Vadimi, Attached is the docker file. I have changed it version 2. I am getting below error **"Step 7/20 : RUN go get -u github.com/vadimi/go-http-ntlm/v2 ---> Running in 63251f047363
package github.com/vadimi/go-http-ntlm/v2: cannot find package "github.com/vadimi/go-http-ntlm/v2" in any of: /usr/local/go/src/github.com/vadimi/go-http-ntlm/v2 (from $GOROOT) /go/src/github.com/vadimi/go-http-ntlm/v2 (from $GOPATH)**
Docker file
`FROM golang:1.10-alpine
ENV WORKDIR /go/src/DefectFilling ENV GOPATH /go
RUN apk update; apk add curl; apk add git
WORKDIR $WORKDIR
RUN go get -u github.com/julienschmidt/httprouter RUN go get -u github.com/vadimi/go-http-ntlm/v2 RUN go get -u github.com/spf13/viper RUN go get -u github.com/streadway/amqp RUN go get -u github.com/Sirupsen/logrus RUN go get -u github.com/natefinch/lumberjack
COPY ./config ./config COPY ./listener ./listener COPY ./models ./models COPY ./utils ./utils
RUN ls -lt
WORKDIR $WORKDIR/listener RUN go build server.go RUN ls -lt
CMD ["./server"]`
I see, go 1.10 is used in your Dockerfile. I only tested it on go 1.14 and above. The following Dockerfile worked for me:
FROM golang:1.14-alpine
ENV WORKDIR /go/src/DefectFilling
ENV GOPATH /go
RUN apk update; apk add curl; apk add git
WORKDIR $WORKDIR
RUN GO111MODULE=on go get -u github.com/vadimi/go-http-ntlm/v2
let me know if there is anything else needs to be done here, closing for now.
Hi,
While i am using " RUN go get -u github.com/vadimi/go-http-ntlm" from my docker file i am getting below error
"# github.com/vadimi/go-http-ntlm src/github.com/vadimi/go-http-ntlm/ntlmtransport.go:50:29: resp.Header.Values undefined (type http.Header has no field or method Values)"