-
Notifications
You must be signed in to change notification settings - Fork 344
Open
Description
Hi, I'm trying to dockerize my project and I need to install the gocron package, but when it's building the container returns me the next error:
no required module provides package github.com/jasonlvhit/gocron; to add it: #0 1.228 go get github.com/jasonlvhit/gocron
I imported in my go file like this:
import ( "github.com/jasonlvhit/gocron" )
And this is my Dockerfile config
FROM golang:1.20.2 # set working directory WORKDIR /usr/src/app # pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change COPY go.mod go.sum ./ RUN go mod download && go mod verify RUN go get github.com/jasonlvhit/gocron # install gin for hot reloading RUN go install github.com/codegangsta/gin@latest # copy the source code COPY . . # build the binary RUN go build -v -o /usr/local/bin/app ./... # expose port 80 EXPOSE 80 # command to start the application with hot reloading CMD gin -i -p 80 -a 8080 run app
When I installed on local enviroment works correctly, but I need to runs on docker :S
Metadata
Metadata
Assignees
Labels
No labels