the middle of the idiots
This commit is contained in:
@@ -8,13 +8,12 @@ RUN apk update && apk add --no-cache git ca-certificates tzdata
|
||||
# Create and change to the app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy go mod files and download dependencies
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy local code to the container image
|
||||
# Copy all source files first to get a proper module graph
|
||||
COPY . ./
|
||||
|
||||
# Build the binary directly without mod tidy (to avoid transitive dependency issues)
|
||||
RUN go mod init mohportal 2>/dev/null || true && go get -d ./... && CGO_ENABLED=0 GOOS=linux go build -v -o server
|
||||
|
||||
# Build the binary
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user