2024-01-25 19:25:02 +03:00
|
|
|
FROM golang:1.20-alpine as builder
|
|
|
|
RUN apk add --no-cache git gcc musl-dev
|
2019-07-05 04:20:25 +03:00
|
|
|
WORKDIR /go/croc
|
|
|
|
COPY . .
|
2021-01-27 21:30:45 +03:00
|
|
|
RUN go build -v -ldflags="-s -w"
|
2019-07-05 04:20:25 +03:00
|
|
|
|
2021-11-17 06:22:56 +03:00
|
|
|
FROM alpine:latest
|
2019-07-05 04:20:25 +03:00
|
|
|
EXPOSE 9009
|
|
|
|
EXPOSE 9010
|
|
|
|
EXPOSE 9011
|
|
|
|
EXPOSE 9012
|
|
|
|
EXPOSE 9013
|
2019-12-06 16:49:45 +03:00
|
|
|
COPY --from=builder /go/croc/croc /go/croc/croc-entrypoint.sh /
|
2021-04-22 12:53:49 +03:00
|
|
|
USER nobody
|
2019-12-06 16:49:45 +03:00
|
|
|
ENTRYPOINT ["/croc-entrypoint.sh"]
|
|
|
|
CMD ["relay"]
|