From 5ae988cb6cfffa96dcc813d98010aae982d62ad8 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Thu, 5 Mar 2026 01:31:57 +0100 Subject: [PATCH] go mod --- dockerfile | 6 +++--- go.mod | 8 ++++++++ go.sum | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/dockerfile b/dockerfile index 1084547..853e5e1 100644 --- a/dockerfile +++ b/dockerfile @@ -19,15 +19,15 @@ RUN CGO_ENABLED=0 GOOS=${GO_OS} GOARCH=${GO_ARCH} \ go build \ -installsuffix cgo \ -ldflags="-w -s -X 'main.APP_VERSION=${APP_VERSION}' -X 'main.COMMIT_ID=$(git log HEAD --oneline | awk '{print $1}' | head -n1)'" \ - --o /app + --o /gocv # Stage 2 ยท scratch image FROM scratch # Copy the necessary stuff from the build stage -COPY --from=build /app /app +COPY --from=build /gocv /gocv # Copy the certificates - in case of fetches COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem # Execute the binary -ENTRYPOINT ["/app"] +ENTRYPOINT ["/gocv serve"] diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3ea1dda --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module git.bjphoster.com/source/go-cv + +go 1.22.2 + +require ( + github.com/gorilla/mux v1.8.1 + gopkg.in/yaml.v2 v2.4.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..215de0d --- /dev/null +++ b/go.sum @@ -0,0 +1,6 @@ +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=