agones.dev/agones@v1.54.0/build/build-sdk-images/go/Dockerfile (about)

     1  # Copyright 2019 Google LLC All Rights Reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  ARG BASE_IMAGE=agones-build-sdk-base:latest
    15  FROM $BASE_IMAGE
    16  
    17  RUN apt-get --allow-releaseinfo-change update && \
    18      apt-get install -y wget jq && \
    19      apt-get clean
    20  
    21  # install go
    22  WORKDIR /usr/local
    23  ENV GO_VERSION=1.24.6
    24  ENV GO111MODULE=on
    25  ENV GOPATH /go
    26  RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
    27      tar -xzf go${GO_VERSION}.linux-amd64.tar.gz && rm go${GO_VERSION}.linux-amd64.tar.gz && mkdir -p ${GOPATH}
    28  
    29  ENV PATH /usr/local/go/bin:/go/bin:$PATH
    30  
    31  # install protoc-gen-go
    32  RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 && \
    33      go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 && \
    34      go install golang.org/x/tools/cmd/goimports@latest
    35  
    36  
    37  # code generation scripts
    38  COPY *.sh /root/
    39  RUN chmod +x /root/*.sh