ARG GO_VERSION

FROM golang:${GO_VERSION}-alpine AS development-runner

ENV CGO_ENABLED=0

RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh gcc libc-dev
ENV GOPATH /app
RUN mkdir -p /app/src/github.com/darkweak/souin
WORKDIR /app/src/github.com/darkweak/souin
COPY . .
RUN go mod tidy
RUN go mod download

WORKDIR /app/src/github.com/darkweak/souin/plugins/souin

CMD ["go", "run", "main.go"]
