github.com/puellanivis/breton@v0.2.16/masher/Dockerfile (about)

     1  # This docker image builds upon the golang docker image to support a more automated process for building
     2  # golang files.
     3  FROM golang:1.21
     4  MAINTAINER Cassondra Foesch <puellanivis@gmail.com>
     5  
     6  # Setup various environment and argument settings which define the building environment.
     7  ARG BRANCH="testing"
     8  ARG HEAD="refs/head/testing"
     9  ARG PROJECT=
    10  WORKDIR /go/src
    11  
    12  # Update pkgs and pull down:
    13  #  * bsdtar		(bsdtar handles .zip files as well as tarballs)
    14  #  * ca-certificates	(some packages may be retrieved by https)
    15  #  * fakeroot           (used by debian package builder)
    16  #  * lintian            (a linter for debian package definitions)
    17  #  * tzdata             (timezone data)
    18  RUN apt-get update && apt-get install -y --no-install-recommends \
    19  	libarchive-tools \
    20  	ca-certificates \
    21  	fakeroot \
    22  	lintian \
    23  	tzdata \
    24  	&& apt-get clean \
    25  	&& rm -rf /var/lib/apt/lists/*
    26  
    27  # Here, we pull down a protoc 3 release, and unpack it.
    28  # This _could_ technically be removed now that debian stretch (baseline since golang:1.9 has a protoc v3.0 or higher…
    29  # However, I don’t think it makes sense to use older version, better to be able to advance as it releases outselves.
    30  RUN mkdir -p /usr/bin && \
    31  	cd /usr && \
    32  	curl -sS -L https://github.com/protocolbuffers/protobuf/releases/download/v24.2/protoc-24.2-linux-x86_64.zip | \
    33  		bsdtar -xvf- --exclude=readme.txt && \
    34  	chmod 755 /usr/bin/protoc
    35  
    36  # Here we pull down binaries which are nearly universally a good idea to have.
    37  # * protoc-gen-go	because protobuffers are a good language-neutral data-storage definition language.
    38  # * protoc-gen-go-grpc	because gRPC is a good language-interop RPC, and this is the new package to build it.
    39  # * goimports	permits us to use goimports.
    40  # * godoc	go stopped bundling godoc with the central binary, so we have to grab it ourselves.
    41  # * golint	permits us to use golinter. (Now deprecated.)
    42  RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 && \
    43  	go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 && \
    44  	go install golang.org/x/tools/cmd/goimports@latest && \
    45  	go install golang.org/x/tools/cmd/godoc@latest && \
    46  	go install golang.org/x/lint/golint@latest # new intentionally last
    47  
    48  # This script is violitile, and rebuilding/retrieving every/any libraries anytime it changes is not a good idea.
    49  COPY mash.sh /bin/mash.sh