agones.dev/agones@v1.53.0/build/build-sdk-images/node/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 ## --allow-releaseinfo-change is a workaround for the new debian release 18 ## Can be removed when upgrading to bullseye 19 RUN apt-get --allow-releaseinfo-change update && apt-get install -y curl && apt-get install -y software-properties-common && \ 20 apt-get install -y gnupg && apt-get clean 21 22 # Import the Nodesource GPG key 23 RUN apt-get update && \ 24 apt-get install -y ca-certificates curl gnupg && \ 25 mkdir -p /etc/apt/keyrings && \ 26 curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 27 28 # Create deb repository for a specific Node major version 29 ARG NODE_MAJOR=20 30 RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list 31 32 # Update and install Node.js 33 RUN apt-get update && apt-get install -y nodejs 34 35 # Installing request is to address a bug with node-pre-gyp 36 RUN npm install --unsafe-perm --global request@2.88.2 grpc-tools@1.11.3 37 38 # code generation scripts 39 COPY *.sh /root/ 40 RUN chmod +x /root/*.sh