Skip to content

Commit

Permalink
Upgrade base ruby image for docker images (#15534)
Browse files Browse the repository at this point in the history
* Upgrade base ruby image for docker images
* Update base docker image for CI
  • Loading branch information
crohr committed May 14, 2024
1 parent 6ae2583 commit 2bc8e3d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
uses: runs-on/cache@v4
with:
path: cache/bundle
key: gem-${{ hashFiles('.ruby-version') }}-${{ hashFiles('Gemfile.lock') }}
key: gem-bookworm-${{ hashFiles('.ruby-version') }}-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
gem-${{ hashFiles('.ruby-version') }}-
gem-bookworm-${{ hashFiles('.ruby-version') }}-
- name: Cache NPM
uses: runs-on/cache@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions docker/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.4
ARG RUBY_VERSION
FROM ruby:${RUBY_VERSION}-bullseye
FROM ruby:${RUBY_VERSION}-bookworm

ENV NODE_VERSION="20.9.0"
ENV BUNDLER_VERSION="2.5.10"
Expand All @@ -9,7 +9,7 @@ ENV BUNDLE_WITHOUT="development:production:docker"

ENV PGVERSION=13
RUN wget --quiet -O- https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list
echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list

ENV CHROME_SOURCE_URL="https://dl.google.com/dl/linux/direct/google-chrome-stable_current_amd64.deb"
RUN --mount=type=cache,target=/var/cache/apt export f="/tmp/chrome.deb" && wget --no-verbose -O $f $CHROME_SOURCE_URL && \
Expand Down
4 changes: 2 additions & 2 deletions docker/prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG RUBY_VERSION="3.3.1"
FROM ruby:${RUBY_VERSION}-bullseye as base
FROM ruby:${RUBY_VERSION}-bookworm as base
LABEL maintainer="operations@openproject.com"

ARG BUNDLER_VERSION="2.5.10"
Expand Down Expand Up @@ -96,7 +96,7 @@ FROM base as all-in-one
ENV OPENPROJECT_RAILS__CACHE__STORE=memcache
ENV DATABASE_URL=postgres://openproject:openproject@127.0.0.1/openproject
ENV PGDATA=/var/openproject/pgdata
ARG GOSU_VERSION="1.17"
ENV GOSU_VERSION="1.17"

RUN ./docker/prod/setup/postinstall-onprem.sh

Expand Down
11 changes: 6 additions & 5 deletions docker/prod/setup/preinstall-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,30 @@ apt-get install -yq --no-install-recommends \
curl -s https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCHITECTURE}.tar.gz | tar xzf - -C /usr/local --strip-components=1

curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list
echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' > /etc/apt/sources.list.d/pgdg.list

apt-get update -qq
apt-get install -yq --no-install-recommends \
libpq-dev \
postgresql-client-$CURRENT_PGVERSION \
postgresql-client-$NEXT_PGVERSION \
libpq5 \
libffi7 \
libffi8 \
unrtf \
tesseract-ocr \
poppler-utils \
catdoc \
imagemagick \
libclang-dev
libclang-dev \
git


# Specifics for BIM edition
if [ ! "$BIM_SUPPORT" = "false" ]; then
apt-get install -y wget unzip

# https://learn.microsoft.com/en-gb/dotnet/core/install/linux-debian#debian-11
wget --quiet https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O /tmp/packages-microsoft-prod.deb
# https://learn.microsoft.com/en-gb/dotnet/core/install/linux-debian#debian-12
wget --quiet https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O /tmp/packages-microsoft-prod.deb
dpkg -i /tmp/packages-microsoft-prod.deb
rm /tmp/packages-microsoft-prod.deb

Expand Down

0 comments on commit 2bc8e3d

Please sign in to comment.