Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ FROM --platform=linux/amd64 ubuntu:22.04
# Set DEBIAN_FRONTEND to noninteractive to avoid prompts during installation
ENV DEBIAN_FRONTEND=noninteractive

# Time zone for dates the API prints, e.g. "Report created on <date>" in report
# footers. Cloud Run runs on UTC, so without this a report made after 7 pm
# Eastern shows tomorrow's date. Los Angeles matches the EJAM app's fallback
# (it uses the user's browser time zone, else America/Los_Angeles), so every
# mainland US user sees today's date until midnight in Los Angeles.
ENV TZ=America/Los_Angeles

# Install System Dependencies, Pandoc, Git LFS, and Google Chrome
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common wget unzip gnupg ca-certificates locales \
software-properties-common wget unzip gnupg ca-certificates locales tzdata \
pandoc git git-lfs \
libudunits2-dev libmysqlclient-dev libcurl4-openssl-dev libsodium-dev \
libgdal-dev libgeos-dev libproj-dev libssl-dev libxml2-dev zlib1g-dev \
Expand Down Expand Up @@ -46,18 +53,15 @@ RUN echo '#!/bin/bash\nexec /usr/bin/google-chrome-stable --no-sandbox --disable
echo 'CHROMOTE_HOST=127.0.0.1' >> /etc/R/Renviron.site

# EJAM version: this ARG is the ONE place that sets which tagged EJAM release is installed.

ARG EJAM_VERSION=v3.2022.3

# That ARG can be overriden at build time without editing this file, e.g.:

# docker build --build-arg EJAM_VERSION=v3.2022.3 .
# Override at build time without editing this file, e.g.:
# docker build --build-arg EJAM_VERSION=v3.2022.2 .
# docker build --build-arg EJAM_VERSION=v3.2023.0 .
# docker build --build-arg EJAM_VERSION=v4.2024.0 .

# A branch name also works (no leading "v"), e.g. EJAM_VERSION=development -- but a branch
# moves while the "git clone" RUN layer below is cached, so a plain rebuild may reuse an old
# clone of that branch; force a fresh pull of the current tip with "docker build --no-cache".
# A CI build can supply it from a repo variable (see README "Choosing the EJAM version").
ARG EJAM_VERSION=v4.2024.0
# Record the version in the image so the running API can report which EJAM it was built with.
ENV EJAM_VERSION=${EJAM_VERSION}

Expand Down
4 changes: 2 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/canada-edj/ejamapi:v3.2022.3', '.']
args: ['build', '-t', 'gcr.io/canada-edj/ejamapi:v4.2024.0', '.']
env:
- 'DOCKER_BUILDKIT=1'

images:
- 'gcr.io/canada-edj/ejamapi:v3.2022.3'
- 'gcr.io/canada-edj/ejamapi:v4.2024.0'
Loading