github.com/oinume/lekcije@v0.0.0-20231017100347-5b4c5eb6ab24/backend/docker/Dockerfile-server (about)

     1  FROM golang:1.21-buster AS builder
     2  
     3  RUN set -eux \
     4  	&& apk --update add --no-cache \
     5  		bash \
     6  		git \
     7  		make
     8  
     9  RUN echo "" > ~/.gitconfig \
    10      && git config --global url."https://github.com".insteadOf git://github.com \
    11      && git config --global http.https://gopkg.in.followRedirects true
    12  
    13  WORKDIR /go/src/github.com/oinume/lekcije
    14  Add . /go/src/github.com/oinume/lekcije
    15  RUN make build/server
    16  
    17  
    18  FROM alpine
    19  COPY --from=builder /go/src/github.com/oinume/lekcije/bin/lekcije_server /lekcije_server
    20  
    21  RUN set -eux \
    22  	&& apk --update add --no-cache ca-certificates
    23  
    24  EXPOSE ${PORT:-4001}
    25  EXPOSE ${GRPC_PORT:-4002}
    26  
    27  ENTRYPOINT ["/lekcije_server"]