ARG GO_VERSION

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

RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh gcc libc-dev binutils-gold

ENV GOPATH /app
RUN mkdir -p /app/src/github.com/darkweak/souin
WORKDIR /app/src/github.com/darkweak/souin
COPY . .

WORKDIR /app/src/github.com/darkweak/souin/plugins/echo
RUN go mod tidy
RUN go mod download

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