This resolves the
go: error loading module requirements
error seen when building with golang 1.12.
Note that beginning with golang 1.13, WriteAt returns an error of the
file is opened with O_APPEND; this patch removes that flag.
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I862d54a2dba11aa15822a33f5d326d99b04a7b79
w.WriteHeader(http.StatusInternalServerError)
return
}
- f, err := os.OpenFile(fp, os.O_APPEND|os.O_WRONLY, 0644)
+ f, err := os.OpenFile(fp, os.O_WRONLY, 0644)
if err != nil {
log.Printf("unable to open file %s\n", err)
w.WriteHeader(http.StatusInternalServerError)
-FROM golang:1.12 AS builder
+FROM golang:1.13 AS builder
RUN mkdir /bpa-restapi-agent
ADD . /bpa-restapi-agent
WORKDIR /bpa-restapi-agent
RUN make build
-FROM golang:1.12
+FROM golang:1.13
COPY --from=builder /bpa-restapi-agent/build/_output/bin/bpa-restapi-agent /bpa-restapi-agent