You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi , i am trying to run coraza inside a container and since i am not very skillful in go i am stuck.
here is my dockerfile :
FROM golang:1.20
WORKDIR /app
COPY *.go ./
RUN go mod init github.com/gin-gitaxias/Ping-go
RUN go get github.com/corazawaf/coraza/v3@latest
RUN go mod tidy
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o /docker-coraza
EXPOSE 8080
CMD [ "/docker-coraza" ]
and here is my main.go
package main
import (
"github.com/corazawaf/coraza/v3"
)
func initCoraza(){
coraza.NewWaf()
}
when i do docker compose i have this :
=> ERROR [8/8] RUN CGO_ENABLED=0 GOOS=linux go build -o /docker-coraza 5.1s
failed to solve: process "/bin/sh -c CGO_ENABLED=0 GOOS=linux go build -o /docker-coraza" did not complete successfully: exit code: 1
Does someone have some advice ?
Beta Was this translation helpful? Give feedback.
All reactions