github.com/ulule/limiter/v3@v3.11.3-0.20230613131926-4cb9c1da4633/scripts/conf/go/Dockerfile (about)

     1  FROM golang:1-bullseye
     2  
     3  MAINTAINER thomas@leroux.io
     4  
     5  ENV DEBIAN_FRONTEND noninteractive
     6  ENV LANG C.UTF-8
     7  ENV LC_ALL C.UTF-8
     8  
     9  RUN apt-get -y update \
    10      && apt-get upgrade -y \
    11      && apt-get -y install git \
    12      && apt-get clean \
    13      && rm -rf /var/lib/apt/lists/* \
    14      && useradd -ms /bin/bash gopher
    15  
    16  COPY go.mod go.sum /media/ulule/limiter/
    17  RUN chown -R gopher:gopher /media/ulule/limiter
    18  ENV GOPATH /home/gopher/go
    19  ENV PATH $GOPATH/bin:$PATH
    20  USER gopher
    21  
    22  RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
    23  
    24  WORKDIR /media/ulule/limiter
    25  RUN go mod download
    26  COPY --chown=gopher:gopher . /media/ulule/limiter
    27  
    28  CMD [ "/bin/bash" ]