mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-14 10:08:44 +00:00
76 lines
2.6 KiB
Docker
76 lines
2.6 KiB
Docker
# Copyright 2019 Google LLC
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
FROM debian:bookworm
|
|
|
|
# set env vars
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ENV OPEN_MATCH_CI_MODE=1
|
|
ENV KUBECONFIG=$HOME/.kube/config
|
|
ENV GOPATH=/go
|
|
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
|
|
|
RUN apt-get update -y \
|
|
&& apt-get install -y -qq --no-install-recommends \
|
|
apt-utils \
|
|
git \
|
|
make \
|
|
python3 \
|
|
virtualenv \
|
|
curl \
|
|
sudo \
|
|
unzip \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
curl \
|
|
software-properties-common \
|
|
gnupg2 \
|
|
libc6 \
|
|
build-essential
|
|
RUN mkdir -p /usr/share/keyrings/
|
|
|
|
# Docker
|
|
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | tee -a /etc/apt/sources.list.d/docker.list \
|
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg \
|
|
&& apt-get update -y \
|
|
&& apt-get install -y -qq \
|
|
docker-ce \
|
|
docker-ce-cli \
|
|
containerd.io
|
|
|
|
# Cloud SDK
|
|
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
|
|
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
|
|
&& apt-get update -y \
|
|
&& apt-get install -y -qq \
|
|
google-cloud-cli \
|
|
google-cloud-sdk-gke-gcloud-auth-plugin
|
|
|
|
# Install Golang
|
|
RUN mkdir -p /toolchain/golang
|
|
WORKDIR /toolchain/golang
|
|
RUN rm -rf /usr/local/go/
|
|
|
|
# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
|
|
# reference: https://github.com/docker-library/golang/blob/master/1.20/bookworm/Dockerfile
|
|
RUN curl -L https://golang.org/dl/go1.21.5.linux-amd64.tar.gz | tar -C /usr/local -xz
|
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \
|
|
&& chmod -R 777 "$GOPATH"
|
|
|
|
# Prepare toolchain, workspace, homedir
|
|
RUN mkdir -p \
|
|
/toolchain \
|
|
/workspace \
|
|
$HOME/.kube/
|
|
WORKDIR /workspace
|