diff --git a/docker-image/Dockerfile b/docker-image/Dockerfile index a4d3cf4..cdaa218 100644 --- a/docker-image/Dockerfile +++ b/docker-image/Dockerfile @@ -1,13 +1,12 @@ -FROM golang:1.10.0 +FROM golang:1.20.0 ENV REDIS-SERVICE-NAME="redis" -RUN go get github.com/codegangsta/negroni \ - github.com/gorilla/mux \ - github.com/xyproto/simpleredis + WORKDIR /app -ADD ./main.go . -RUN CGO_ENABLED=0 GOOS=linux go build -o main . +ADD go.* ./main.go . +RUN go mod download \ + && CGO_ENABLED=0 GOOS=linux go build -o main . FROM scratch WORKDIR /app diff --git a/docker-image/go.mod b/docker-image/go.mod new file mode 100644 index 0000000..214ad48 --- /dev/null +++ b/docker-image/go.mod @@ -0,0 +1,15 @@ +module github.com/infralovers/gitops + +go 1.20 + +require ( + github.com/codegangsta/negroni v1.0.0 + github.com/gorilla/mux v1.8.0 + github.com/xyproto/simpleredis v0.0.0-20230406121716-97efc4f25bf1 +) + +require ( + github.com/garyburd/redigo v1.6.4 // indirect + github.com/gomodule/redigo v1.8.9 // indirect + github.com/xyproto/pinterface v1.5.3 // indirect +) diff --git a/docker-image/go.sum b/docker-image/go.sum new file mode 100644 index 0000000..76e87f5 --- /dev/null +++ b/docker-image/go.sum @@ -0,0 +1,24 @@ +github.com/codegangsta/negroni v1.0.0 h1:+aYywywx4bnKXWvoWtRfJ91vC59NbEhEY03sZjQhbVY= +github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/garyburd/redigo v1.6.4 h1:LFu2R3+ZOPgSMWMOL+saa/zXRjw0ID2G8FepO53BGlg= +github.com/garyburd/redigo v1.6.4/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw= +github.com/gomodule/redigo v1.8.8 h1:f6cXq6RRfiyrOJEV7p3JhLDlmawGBVBBP1MggY8Mo4E= +github.com/gomodule/redigo v1.8.8/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE= +github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws= +github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/xyproto/pinterface v1.5.3 h1:RKkNT88cwrSqD9hU4cYAO5yeo8srg4TG+74Pcj88iz0= +github.com/xyproto/pinterface v1.5.3/go.mod h1:X5B5pKE49ak7SpyDh5QvJvLH9cC9XuZNDcl5hEyYc34= +github.com/xyproto/simpleredis v0.0.0-20150523000142-9f9bdf9000d1 h1:+vB14RyCTr3FERRzenZftip8alGqRbhx7kzS5za9/VQ= +github.com/xyproto/simpleredis v0.0.0-20150523000142-9f9bdf9000d1/go.mod h1:uSYFxIza9OX4jlWn/KHQRd0YDCXza/L/S4WatobDE0U= +github.com/xyproto/simpleredis v0.0.0-20220117114834-9a1000fbd7af h1:cysD3MzP3R/pQETtrLsxudVsc79USsWNFY27kYooQbY= +github.com/xyproto/simpleredis v0.0.0-20220117114834-9a1000fbd7af/go.mod h1:klBJiwXWN4OvxC5qVNAr7RnRYowZh9WyeAJoU6aZjZ0= +github.com/xyproto/simpleredis v0.0.0-20230406121716-97efc4f25bf1 h1:d//7H6H837U72eycvfiPi/JsvbNMVbqKvcpveu6YpaA= +github.com/xyproto/simpleredis v0.0.0-20230406121716-97efc4f25bf1/go.mod h1:/rLBRnXHiELDjKl1mJ6xTgVxXtwGaFl5Q1VH+Eogzhc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=