mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 03:58:34 +02:00
Upgrade builder base image (#2352)
This allows us to install Java 21 in the image.
This commit is contained in:
parent
37e4607c91
commit
742481932e
2 changed files with 36 additions and 21 deletions
|
@ -28,7 +28,7 @@ COPY go.sum ./
|
|||
COPY go.mod ./
|
||||
RUN go build -o /deployCloudSchedulerAndQueue
|
||||
|
||||
FROM marketplace.gcr.io/google/debian11
|
||||
FROM marketplace.gcr.io/google/ubuntu2204
|
||||
ENV DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8
|
||||
# Add script for cloud scheduler and cloud tasks deployment
|
||||
COPY --from=deployCloudSchedulerAndQueueBuilder /deployCloudSchedulerAndQueue /usr/local/bin/deployCloudSchedulerAndQueue
|
||||
|
|
|
@ -15,60 +15,75 @@
|
|||
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get upgrade -y
|
||||
|
||||
apt-get install locales -y
|
||||
locale-gen en_US.UTF-8
|
||||
apt-get install apt-utils gnupg -y
|
||||
apt-get upgrade -y
|
||||
apt-get install apt-utils gnupg curl lsb-release -y
|
||||
|
||||
# Set up Google Cloud SDK repo
|
||||
# Cribbed from https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
|
||||
apt-get install apt-transport-https ca-certificates -y
|
||||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||
|
||||
# Set up PostgreSQL repo. We need pg_dump v11 (same as current server version).
|
||||
# This needs to be downloaded from postgresql's own repo, because ubuntu2204
|
||||
# only provides v14.
|
||||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
apt-get update -y
|
||||
|
||||
# Install GPG2 (in case it was not included)
|
||||
apt-get install gnupg2 -y
|
||||
|
||||
# Install Java
|
||||
apt-get install openjdk-17-jdk-headless -y
|
||||
apt-get install openjdk-21-jdk-headless -y
|
||||
|
||||
# Install Python
|
||||
apt-get install python3 -y
|
||||
# As of March 2021 python3 is at v3.6. Get pip then install dataclasses
|
||||
# (introduced in 3.7) for nom_build
|
||||
apt-get install python3-pip -y
|
||||
python3 -m pip install dataclasses
|
||||
# Install curl.
|
||||
apt-get install curl -y
|
||||
|
||||
# Install Node
|
||||
apt-get install npm -y
|
||||
npm cache clean -f
|
||||
npm install -g n
|
||||
# Retrying because fails are possible for node.js intallation. See -
|
||||
# Retrying because fails are possible for node.js intallation. See
|
||||
# https://github.com/nodejs/build/issues/1993
|
||||
for i in {1..5}; do n 20.10.0 && break || sleep 15; done
|
||||
# Install gcloud
|
||||
# Cribbed from https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
|
||||
apt-get install lsb-release -y
|
||||
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
|
||||
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO 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 add -
|
||||
# Install pg_dump v11 (same as current server version). This needs to be
|
||||
# downloaded from postgresql's own repo, because ubuntu1804 is too old. With a
|
||||
# newer image 'apt-get install postgresql-client-11' may be sufficient.
|
||||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" \
|
||||
> /etc/apt/sources.list.d/pgdg.list'
|
||||
apt-get update -y
|
||||
|
||||
# Install gp_dump
|
||||
apt-get install postgresql-client-11 procps -y
|
||||
|
||||
# Install gcloud
|
||||
apt-get install google-cloud-cli -y
|
||||
apt-get install google-cloud-sdk-app-engine-java -y
|
||||
|
||||
# Install git
|
||||
apt-get install git -y
|
||||
|
||||
# Install docker
|
||||
apt-get install docker.io -y
|
||||
|
||||
# Install Chrome
|
||||
apt-get install wget -y
|
||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
apt install ./google-chrome-stable_current_amd64.deb -y
|
||||
|
||||
# Install libxss1 (needed by Karma)
|
||||
apt install libxss1
|
||||
|
||||
# Use unzip to extract files from jars.
|
||||
apt-get install zip -y
|
||||
|
||||
# Get netstat, used for checking Cloud SQL proxy readiness.
|
||||
apt-get install net-tools
|
||||
|
||||
# Clean up
|
||||
apt-get remove apt-utils locales -y
|
||||
apt-get autoclean -y
|
||||
apt-get autoremove -y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue