github.com/derat/nup@v0.0.0-20230418113745-15592ba7c620/build/Dockerfile (about) 1 # Stage 0: Install Cloud SDK and Chrome from Debian packages. 2 # Also install the chromedriver executable. 3 4 FROM golang:bullseye 5 6 # "gcloud builds submit" tars up and sends files from the local directory, but 7 # I'm not sure where (if anywhere) they're actually available within the image 8 # as it's being built. Copy this script over so we can run it later. 9 COPY install_chromedriver.sh /tmp/install_chromedriver.sh 10 11 # The Chrome stuff is based on https://askubuntu.com/a/510186 and 12 # https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker 13 RUN apt-get update 14 RUN apt-get upgrade 15 RUN apt-get install -y --no-install-recommends gnupg wget 16 RUN wget -q -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 17 RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' \ 18 >>/etc/apt/sources.list.d/chrome.list 19 RUN wget -q -O- https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - 20 RUN echo 'deb [arch=amd64] https://packages.cloud.google.com/apt cloud-sdk main' \ 21 >>/etc/apt/sources.list.d/cloud-sdk.list 22 RUN apt-get update 23 RUN apt-get install -y \ 24 fonts-noto-core \ 25 fonts-noto-mono \ 26 fonts-noto-ui-core \ 27 google-chrome-stable \ 28 google-cloud-sdk \ 29 google-cloud-sdk-app-engine-go \ 30 google-cloud-sdk-app-engine-python \ 31 google-cloud-sdk-datastore-emulator \ 32 npm \ 33 python-is-python2 \ 34 unzip \ 35 xvfb 36 RUN npm install -g typescript@4.7.2 37 RUN sh -e /tmp/install_chromedriver.sh