From d0bb9bb926120ae97996e237bb6b21a2682da679 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 7 Aug 2023 07:59:38 -0700 Subject: [PATCH 1/6] Add openssh-client packages into base image to ensure SSH in all downstream images --- product/base/Dockerfile.centos7 | 1 + product/base/Dockerfile.ubuntu1804 | 1 + product/base/Dockerfile.ubuntu2204 | 1 + 3 files changed, 3 insertions(+) diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 0612f9f4a..273410824 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -22,6 +22,7 @@ RUN yum upgrade -y -q \ libuser-devel \ libxml2-devel \ openssl-devel \ + openssh-clients \ pandoc \ perl-Digest-MD5 \ postgresql-libs \ diff --git a/product/base/Dockerfile.ubuntu1804 b/product/base/Dockerfile.ubuntu1804 index c5ca6bafd..dafa14420 100644 --- a/product/base/Dockerfile.ubuntu1804 +++ b/product/base/Dockerfile.ubuntu1804 @@ -62,6 +62,7 @@ RUN apt-get update --fix-missing \ libxml2-dev \ locales \ make \ + openssh-client \ pandoc \ perl \ sudo \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 690b67835..f326b3e31 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -62,6 +62,7 @@ RUN apt-get update --fix-missing \ libxml2-dev \ locales \ make \ + openssh-client \ pandoc \ perl \ sudo \ From 600181272c6217d9866d4a8ddaa67125df4d2ad7 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 7 Aug 2023 09:33:06 -0700 Subject: [PATCH 2/6] Fix GPG call in Ubuntu 18.04 base --- product/base/Dockerfile.ubuntu1804 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/base/Dockerfile.ubuntu1804 b/product/base/Dockerfile.ubuntu1804 index dafa14420..6fb30a9ad 100644 --- a/product/base/Dockerfile.ubuntu1804 +++ b/product/base/Dockerfile.ubuntu1804 @@ -81,7 +81,7 @@ RUN apt-get update --fix-missing \ ### Install tini ### ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc -RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ && gpg --batch --verify /tini.asc /tini \ && chmod +x /tini \ && ln -s /tini /usr/local/bin/tini From bfe25b121a55b565edde63484aa8dc101864e840 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 7 Aug 2023 09:41:13 -0700 Subject: [PATCH 3/6] Fix path in build --- .github/workflows/build-prerelease.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-prerelease.yaml b/.github/workflows/build-prerelease.yaml index 2e2ec3ae4..66addbdfc 100644 --- a/.github/workflows/build-prerelease.yaml +++ b/.github/workflows/build-prerelease.yaml @@ -124,7 +124,7 @@ jobs: if: steps.build1.outcome == 'failure' uses: ./.github/actions/build-test-scan-push with: - context: .${{ matrix.config.product }} + context: ./${{ matrix.config.product }} os: ${{ matrix.config.os }} product: product-base image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} From 1b7c4907ed58a902728ab09e2e82d890d1c23ce2 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 7 Aug 2023 10:59:17 -0700 Subject: [PATCH 4/6] Add `ca-certificates` and explicit `gpg` install to PPM build (#608) * Add `ca-certificates` and explicit `gpg` install * Remove GPG after PPM install --- package-manager/Dockerfile.ubuntu1804 | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-manager/Dockerfile.ubuntu1804 b/package-manager/Dockerfile.ubuntu1804 index 927f61d81..d9d57a908 100644 --- a/package-manager/Dockerfile.ubuntu1804 +++ b/package-manager/Dockerfile.ubuntu1804 @@ -32,7 +32,7 @@ RUN apt-get update -qq && \ ARG RSPM_VERSION=2023.04.0-6 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu/amd64 RUN apt-get update --fix-missing \ - && apt-get install -y --no-install-recommends gdebi-core dpkg-sig \ + && apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \ && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ @@ -41,7 +41,7 @@ RUN apt-get update --fix-missing \ && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig \ + && apt-get purge -y gdebi-core dpkg-sig gpg \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 4e55936ea..b7d44a418 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -32,7 +32,7 @@ RUN apt-get update -qq && \ ARG RSPM_VERSION=2023.04.0-6 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu22/amd64 RUN apt-get update --fix-missing \ - && apt-get install -y --no-install-recommends gdebi-core dpkg-sig \ + && apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \ && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ @@ -41,7 +41,7 @@ RUN apt-get update --fix-missing \ && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig \ + && apt-get purge -y gdebi-core dpkg-sig gpg \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ From 7935496f88ec01443d4c526e7b78f5e504a90b52 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 7 Aug 2023 13:50:11 -0700 Subject: [PATCH 5/6] Remove ubuntu1804 base image (#611) * Revert "Fix GPG call in Ubuntu 18.04 base" This reverts commit 600181272c6217d9866d4a8ddaa67125df4d2ad7. * Remove Ubuntu 18.04 base image - Removes product/base/Dockerfile.ubuntu1804 and product/pro/Dockerfile.ubuntu1804 as neither are in use. - Change defaults and example commands across all project Justfiles to ubuntu2204. - Remove Dockerfile.*.draft from package-manager, would have to be rewritten if we decide to switch PPM to the repo product base image. - Remove 18.04 builds from workflows. - Add NEWS.md entry. * Update product/pro/Justfile Co-authored-by: Benjamin R. J. Schwedler --------- Co-authored-by: Benjamin R. J. Schwedler --- .github/workflows/build-release.yaml | 4 - .github/workflows/lint.yaml | 2 - Justfile | 6 +- NEWS.md | 4 + content/base/Justfile | 4 +- content/pro/Justfile | 4 +- package-manager/Dockerfile.ubuntu1804.draft | 41 ------ package-manager/Dockerfile.ubuntu2204.draft | 41 ------ package-manager/Justfile | 10 +- product/base/Dockerfile.ubuntu1804 | 148 -------------------- product/base/Justfile | 8 +- product/pro/Dockerfile.ubuntu1804 | 29 ---- product/pro/Justfile | 8 +- r-session-complete/Justfile | 8 +- workbench-for-microsoft-azure-ml/Justfile | 8 +- workbench/Justfile | 8 +- 16 files changed, 36 insertions(+), 297 deletions(-) delete mode 100644 package-manager/Dockerfile.ubuntu1804.draft delete mode 100644 package-manager/Dockerfile.ubuntu2204.draft delete mode 100644 product/base/Dockerfile.ubuntu1804 delete mode 100644 product/pro/Dockerfile.ubuntu1804 diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index ba28125ae..205c4f725 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -22,8 +22,6 @@ jobs: config: - {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'ubuntu1804', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} @@ -119,8 +117,6 @@ jobs: config: - {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'ubuntu1804', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 15f71f3e4..7877099c8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,10 +16,8 @@ jobs: fail-fast: false matrix: config: - - {product: 'product/base', os: 'ubuntu1804'} - {product: 'product/base', os: 'ubuntu2204'} - {product: 'product/base', os: 'centos7'} - - {product: 'product/pro', os: 'ubuntu1804'} - {product: 'product/pro', os: 'ubuntu2204'} - {product: 'product/pro', os: 'centos7'} - {product: 'workbench', os: 'ubuntu2204'} diff --git a/Justfile b/Justfile index c35b05a98..d728145d2 100644 --- a/Justfile +++ b/Justfile @@ -33,7 +33,7 @@ _get-clean-version $VERSION: #!/usr/bin/env bash echo -n "$VERSION" | sed 's/[+|-].*//g' -# just _parse-os bionic +# just _parse-os jammy _parse-os OS: #!/usr/bin/env bash if [[ "{{OS}}" == "bionic" ]]; then @@ -44,7 +44,7 @@ _parse-os OS: echo "{{OS}}" fi -# just _rev-parse-os ubuntu1804 +# just _rev-parse-os ubuntu2204 _rev-parse-os OS: #!/usr/bin/env bash if [[ "{{OS}}" == "ubuntu1804" ]]; then @@ -299,7 +299,7 @@ test-image $PRODUCT $VERSION +IMAGES: PYTHON_VERSION_ALT={{PYTHON_VERSION_ALT}} \ $PRODUCT/test "${IMAGE_ARRAY[0]}" "$VERSION" -# just lint workbench ubuntu1804 +# just lint workbench ubuntu2204 lint $PRODUCT $OS: #!/usr/bin/env bash docker run --rm -i -v $PWD/hadolint.yaml:/.config/hadolint.yaml ghcr.io/hadolint/hadolint < $PRODUCT/Dockerfile.$(just _parse-os {{OS}}) diff --git a/NEWS.md b/NEWS.md index ed07f5ffd..d4235cc11 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ changed in each image. This file only captures pervasive, repository-wide changes. +# 2023-08-07 + +- Removed base image Ubuntu 18.04 builds. + # 2023-08-01 - Overhauled the workflows for this repository to use official Github Actions over `just` targets for building, testing, scanning, and pushing images. diff --git a/content/base/Justfile b/content/base/Justfile index 7744929a8..a1defbf8a 100755 --- a/content/base/Justfile +++ b/content/base/Justfile @@ -4,7 +4,7 @@ BUILDX_PATH := "" IMAGE_PREFIX := "rstudio/" PRODUCT := "content-base" -IMAGE_OS := "ubuntu1804" +IMAGE_OS := "ubuntu2204" R_VERSION := "3.6.3" @@ -14,7 +14,7 @@ QUARTO_VERSION := "1.3.340" DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS -# Build content base image - just build ubuntu1804 3.6.3 3.9.5 rstudio/content-base:r3.6.3-py3.9.5-bionic +# Build content base image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-base:r3.6.3-py3.9.5-bionic build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS="": #!/usr/bin/env bash set -euxo pipefail diff --git a/content/pro/Justfile b/content/pro/Justfile index 472e849dc..710d6509c 100755 --- a/content/pro/Justfile +++ b/content/pro/Justfile @@ -4,7 +4,7 @@ BUILDX_PATH := "" IMAGE_PREFIX := "rstudio/" PRODUCT := "content-pro" -IMAGE_OS := "ubuntu1804" +IMAGE_OS := "ubuntu2204" R_VERSION := "3.6.3" @@ -15,7 +15,7 @@ DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS -# Build content pro image - just build ubuntu1804 3.6.3 3.9.5 rstudio/content-pro:r3.6.3-py3.9.5-bionic +# Build content pro image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-pro:r3.6.3-py3.9.5-bionic build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS=DEFAULT_TAG: #!/usr/bin/env bash set -euxo pipefail diff --git a/package-manager/Dockerfile.ubuntu1804.draft b/package-manager/Dockerfile.ubuntu1804.draft deleted file mode 100644 index 88507a1db..000000000 --- a/package-manager/Dockerfile.ubuntu1804.draft +++ /dev/null @@ -1,41 +0,0 @@ -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.17 -ARG PYTHON_VERSION_ALT=3.8.10 -ARG SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu1804-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " - -ARG DEBIAN_FRONTEND=noninteractive - -ENV PATH /opt/rstudio-pm/bin:$PATH -ARG RSPM_VERSION=2022.07.2-11 -ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu/amd64 -COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh -RUN apt-get update --fix-missing \ - && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ - && dpkg-sig --verify ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 apt-get install -yq --no-install-recommends ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && rm ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && ln -s /opt/rstudio-pm/bin/rspm /usr/local/bin/rspm \ - && mkdir -p /var/run/rstudio-pm \ - && chmod +x /usr/local/bin/startup.sh \ - && chown rstudio-pm:rstudio-pm /usr/local/bin/startup.sh \ - && chown -R rstudio-pm:rstudio-pm /var/run/rstudio-pm - -USER rstudio-pm -COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg - -# Set up licensing to work in userspace mode. This will not prevent activating a -# license as root, but it is required to activate one as the non-root user at -# runtime. It's possible for this to fail and the trail will be considered over, -# in which case we can ignore it anyway. -RUN license-manager initialize --userspace || true - -ENTRYPOINT ["tini", "--"] -CMD ["/usr/local/bin/startup.sh"] diff --git a/package-manager/Dockerfile.ubuntu2204.draft b/package-manager/Dockerfile.ubuntu2204.draft deleted file mode 100644 index 67b63c979..000000000 --- a/package-manager/Dockerfile.ubuntu2204.draft +++ /dev/null @@ -1,41 +0,0 @@ -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.17 -ARG PYTHON_VERSION_ALT=3.8.10 -ARG SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " - -ARG DEBIAN_FRONTEND=noninteractive - -ENV PATH /opt/rstudio-pm/bin:$PATH -ARG RSPM_VERSION=2022.07.2-11 -ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu22/amd64 -COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh -RUN apt-get update --fix-missing \ - && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ - && dpkg-sig --verify ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 apt-get install -yq --no-install-recommends ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && rm ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && ln -s /opt/rstudio-pm/bin/rspm /usr/local/bin/rspm \ - && mkdir -p /var/run/rstudio-pm \ - && chmod +x /usr/local/bin/startup.sh \ - && chown rstudio-pm:rstudio-pm /usr/local/bin/startup.sh \ - && chown -R rstudio-pm:rstudio-pm /var/run/rstudio-pm - -USER rstudio-pm -COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg - -# Set up licensing to work in userspace mode. This will not prevent activating a -# license as root, but it is required to activate one as the non-root user at -# runtime. It's possible for this to fail and the trail will be considered over, -# in which case we can ignore it anyway. -RUN license-manager initialize --userspace || true - -ENTRYPOINT ["tini", "--"] -CMD ["/usr/local/bin/startup.sh"] diff --git a/package-manager/Justfile b/package-manager/Justfile index 4df263edd..4cab639b4 100644 --- a/package-manager/Justfile +++ b/package-manager/Justfile @@ -4,7 +4,7 @@ BUILDX_PATH := "" IMAGE_PREFIX := "rstudio-" PRODUCT := "package-manager" -IMAGE_OS := "ubuntu1804" +IMAGE_OS := "ubuntu2204" RSPM_VERSION := "2023.04.0-6" RSPM_LICENSE := "" @@ -22,7 +22,7 @@ PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSPM_VERSION}})" -# Build Package Manager image - just build ubuntu1804 2022.07.2-11 rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 +# Build Package Manager image - just build ubuntu2204 2022.07.2-11 rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -50,7 +50,7 @@ build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="": --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . -# Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 2022.07.2-11 +# Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -62,11 +62,11 @@ test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="": R_VERSION_ALT="{{ R_VERSION_ALT }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 2022.07.2-11 +# Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 test-i TAG=`just _make-default-tag` VERSION=RSPM_VERSION: just test {{ TAG }} {{ VERSION }} bash -# Run Package Manager - just RSPM_LICENSE="" run rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 +# Run Package Manager - just RSPM_LICENSE="" run rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 run TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail diff --git a/product/base/Dockerfile.ubuntu1804 b/product/base/Dockerfile.ubuntu1804 deleted file mode 100644 index 6fb30a9ad..000000000 --- a/product/base/Dockerfile.ubuntu1804 +++ /dev/null @@ -1,148 +0,0 @@ -FROM ubuntu:18.04 -LABEL maintainer="Posit Docker " - -### ARG declarations ### -ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.17 -ARG PYTHON_VERSION_ALT=3.8.17 -ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.3.340 - -### Update/upgrade system packages ### -RUN apt-get update --fix-missing \ - && apt-get upgrade -yq \ - && apt-get install -yq --no-install-recommends \ - apt-transport-https \ - ca-certificates \ - cmake \ - cracklib-runtime \ - curl \ - default-jdk \ - dirmngr \ - dpkg-sig \ - g++ \ - gcc \ - gdal-bin \ - gfortran \ - git \ - gpg \ - gpg-agent \ - gsfonts \ - imagemagick \ - libcairo2-dev \ - libcurl4-openssl-dev \ - libev-dev \ - libfontconfig1-dev \ - libfreetype6-dev \ - libfribidi-dev \ - libgdal-dev \ - libgeos-dev \ - libgl1-mesa-dev \ - libglpk-dev \ - libglu1-mesa-dev \ - libgmp3-dev \ - libharfbuzz-dev \ - libicu-dev \ - libjpeg-dev \ - libmagick++-dev \ - libmysqlclient-dev \ - libopenblas-dev \ - libpaper-utils \ - libpcre2-dev \ - libpng-dev \ - libproj-dev \ - libsodium-dev \ - libssh2-1-dev \ - libssl-dev \ - libtiff-dev \ - libudunits2-dev \ - libv8-dev \ - libxml2-dev \ - locales \ - make \ - openssh-client \ - pandoc \ - perl \ - sudo \ - tcl \ - tk \ - tk-dev \ - tk-table \ - tzdata \ - unixodbc-dev \ - unzip \ - wget \ - zip \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - -### Install tini ### -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc -RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ - && gpg --batch --verify /tini.asc /tini \ - && chmod +x /tini \ - && ln -s /tini /usr/local/bin/tini - -### Install TinyTeX ### -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ - && /root/.TinyTeX/bin/*/tlmgr path remove \ - && mv /root/.TinyTeX/ /opt/TinyTeX \ - && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ - && /opt/TinyTeX/bin/*/tlmgr path add - -### Install Quarto ### -RUN curl -o quarto.tar.gz -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz \ - && mkdir -p /opt/quarto/${QUARTO_VERSION} \ - && tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 \ - && rm -f quarto.tar.gz \ - && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto - -### Install R versions ### -RUN curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION_ALT}_1_amd64.deb \ - && rm -f ./r-${R_VERSION}_1_amd64.deb \ - && rm -f ./r-${R_VERSION_ALT}_1_amd64.deb \ - && ln -s /opt/R/${R_VERSION} /opt/R/default \ - && ln -s /opt/R/default/bin/R /usr/local/bin/R \ - && ln -s /opt/R/default/bin/Rscript /usr/local/bin/Rscript - -### Install Python versions ### -RUN curl -O https://cdn.rstudio.com/python/ubuntu-1804/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/python/ubuntu-1804/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ - && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default - -### Locale configuration ### -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -### Clean up ### -RUN apt-get install -yqf --no-install-recommends \ - && apt-get autoremove \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -LABEL posit.r.version="${R_VERSION}" \ - posit.r.version_alt="${R_VERSION_ALT}" \ - posit.python.version="${PYTHON_VERSION}" \ - posit.python.version_alt="${PYTHON_VERSION_ALT}" \ - posit.tini.version="${TINI_VERSION}" \ - posit.quarto.version="${QUARTO_VERSION}" - -ENTRYPOINT ["/tini", "--"] diff --git a/product/base/Justfile b/product/base/Justfile index b011a4ceb..00c603788 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -3,7 +3,7 @@ set positional-arguments BUILDX_PATH := "" PRODUCT := "product-base" -IMAGE_OS := "ubuntu1804" +IMAGE_OS := "ubuntu2204" IMAGE_REGISTRY := "rstudio" @@ -19,7 +19,7 @@ QUARTO_VERSION := "1.3.340" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" -# Build base image - just build ubuntu1804 rstudio/product-base:ubuntu1804 +# Build base image - just build ubuntu2204 rstudio/product-base:ubuntu2204 build OS=IMAGE_OS *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -50,7 +50,7 @@ build OS=IMAGE_OS *TAGS="": --build-arg QUARTO_VERSION="{{ QUARTO_VERSION }}" \ --file=./Dockerfile.$(just -f ../../Justfile _parse-os {{OS}}) . -# Test base image - just test rstudio/product-base:ubuntu1804 +# Test base image - just test rstudio/product-base:ubuntu2204 test TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -64,6 +64,6 @@ test TAG=`just _make-default-tag` CMD="": OS="{{ IMAGE_OS }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test base image interactively - just test-i rstudio/product-base:ubuntu1804 +# Test base image interactively - just test-i rstudio/product-base:ubuntu2204 test-i TAG=`just _make-default-tag`: just test {{ TAG }} bash diff --git a/product/pro/Dockerfile.ubuntu1804 b/product/pro/Dockerfile.ubuntu1804 deleted file mode 100644 index cca5be578..000000000 --- a/product/pro/Dockerfile.ubuntu1804 +++ /dev/null @@ -1,29 +0,0 @@ -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.17 -ARG PYTHON_VERSION_ALT=3.8.17 -ARG SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu1804-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="Posit Docker " - -ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.17 -ARG PYTHON_VERSION_ALT=3.8.17 -ARG DRIVERS_VERSION=2023.05.0 - -RUN apt-get update \ - && apt-get install -yq --no-install-recommends unixodbc unixodbc-dev \ - && curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && apt-get update \ - && apt-get install -yq --no-install-recommends ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -f ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -rf /var/lib/apt/lists/* \ - && cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini \ - && /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' - -LABEL rstudio.pro-drivers.version="${DRIVERS_VERSION}" - -ENTRYPOINT ["/tini", "--"] diff --git a/product/pro/Justfile b/product/pro/Justfile index f67f5ef1c..354c65466 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -3,7 +3,7 @@ set positional-arguments BUILDX_PATH := "" PRODUCT := "product-base-pro" -IMAGE_OS := "ubuntu1804" +IMAGE_OS := "ubuntu2204" IMAGE_REGISTRY := "rstudio" @@ -22,7 +22,7 @@ DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" -# Build base pro image - just build ubuntu1804 rstudio/product-base-pro:ubuntu1804 +# Build base pro image - just build ubuntu2204 rstudio/product-base-pro:ubuntu2204 build OS=IMAGE_OS *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -58,7 +58,7 @@ build OS=IMAGE_OS *TAGS="": --build-arg DRIVERS_VERSION="${_DRIVERS_VERSION}" \ --file=./Dockerfile.$(just -f ../../Justfile _parse-os {{OS}}) . -# Test base image - just test rstudio/product-base-pro:ubuntu1804 +# Test base image - just test rstudio/product-base-pro:ubuntu2204 test TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -74,6 +74,6 @@ test TAG=`just _make-default-tag` CMD="": OS="{{ IMAGE_OS }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test base image interactively - just test-i rstudio/product-base-pro:ubuntu1804 +# Test base image interactively - just test-i rstudio/product-base-pro:ubuntu2204 test-i TAG=`just _make-default-tag`: just test {{ TAG }} bash diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index 2a7bc6db8..ebbbba833 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.15" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" -# Build r-session-complete image - just build ubuntu1804 2022.07.2+576.pro12 rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 +# Build r-session-complete image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -57,7 +57,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . -# Test r-session-complete image - just test rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test r-session-complete image - just test rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -69,11 +69,11 @@ test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test r-session-complete image interactively - just test-i rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test r-session-complete image interactively - just test-i rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: just test {{ TAG }} {{ VERSION }} bash -# Run r-session-complete - just run rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 +# Run r-session-complete - just run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 run TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail diff --git a/workbench-for-microsoft-azure-ml/Justfile b/workbench-for-microsoft-azure-ml/Justfile index 56232d54c..1ea62bfd8 100644 --- a/workbench-for-microsoft-azure-ml/Justfile +++ b/workbench-for-microsoft-azure-ml/Justfile @@ -18,7 +18,7 @@ PYTHON_VERSION_ALT := "3.8.17" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" -# Build Workbench for Azure ML image - just build ubuntu1804 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 +# Build Workbench for Azure ML image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -48,7 +48,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . -# Test Workbench for Azure ML image - just test rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test Workbench for Azure ML image - just test rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -60,11 +60,11 @@ test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test Workbench for Azure ML image interactively - just test-i rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test Workbench for Azure ML image interactively - just test-i rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: just test {{ TAG }} {{ VERSION }} bash -# Run Workbench for Azure ML - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 +# Run Workbench for Azure ML - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 run TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail diff --git a/workbench/Justfile b/workbench/Justfile index 4937dc9dd..61e8cb971 100644 --- a/workbench/Justfile +++ b/workbench/Justfile @@ -25,7 +25,7 @@ _get-download-url OS=IMAGE_OS: _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" -# Build Workbench image - just build ubuntu1804 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 +# Build Workbench image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": #!/usr/bin/env bash set -euxo pipefail @@ -56,7 +56,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": --build-arg RSW_DOWNLOAD_URL="$(just _get-download-url {{OS}})" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . -# Test Workbench image - just test rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test Workbench image - just test rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": #!/usr/bin/env bash set -euxo pipefail @@ -70,11 +70,11 @@ test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} -# Test Workbench image interactively - just test-i rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 +# Test Workbench image interactively - just test-i rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: just test {{ TAG }} {{ VERSION }} bash -# Run Workbench - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 +# Run Workbench - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 run TAG=`just _make-default-tag` CMD="": #!/usr/bin/env bash set -euxo pipefail From e33a7711a509d5e5185e4afe46f0b2ebb9a67fee Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 8 Aug 2023 10:22:25 -0700 Subject: [PATCH 6/6] Run `apt-get upgrade` on PPM image (#612) * Revert "Fix GPG call in Ubuntu 18.04 base" This reverts commit 600181272c6217d9866d4a8ddaa67125df4d2ad7. * Run apt upgrade on PPM image * Revert "Revert "Fix GPG call in Ubuntu 18.04 base"" This reverts commit 40e1b6d0f177bfb4c18e9bce1f28258f8c1e3ae2. * Update PPM tini to 0.19.0 * Install gpg earlier in Dockerfile.ubuntu1804 * Install gpg earlier in Dockerfile.ubuntu2204 * Add `dirmngr` and `gpg-agent` to dependency installs * Update trust DB before acquiring keys Install ALL recommended packages for dependencies in 18.04 * Curl all our keys because `gpg` on bionic is now unreliable * Comment the issue --- package-manager/Dockerfile.ubuntu1804 | 39 +++++++++++++++++++++------ package-manager/Dockerfile.ubuntu2204 | 24 +++++++++++++---- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/package-manager/Dockerfile.ubuntu1804 b/package-manager/Dockerfile.ubuntu1804 index d9d57a908..fdf081e03 100644 --- a/package-manager/Dockerfile.ubuntu1804 +++ b/package-manager/Dockerfile.ubuntu1804 @@ -10,16 +10,34 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ARG DEBIAN_FRONTEND=noninteractive +ARG TINI_VERSION=0.19.0 ENV PATH /opt/rstudio-pm/bin:$PATH +# Upgrade/install packages ----------------------------------------------------# +RUN apt-get update --fix-missing \ + && apt-get upgrade -yq \ + && apt-get install -yq --no-install-recommends \ + ca-certificates \ + curl \ + dirmngr \ + gpg \ + gpg-agent \ + && rm -rf /var/lib/apt/lists/* + # Runtime settings ------------------------------------------------------------# -ARG TINI_VERSION=0.18.0 -RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini && \ - chmod +x /usr/local/bin/tini +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc +# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address" +RUN gpg --update-trustdb \ + && curl -sL -o /tmp/tini-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6380dc428747f6c393feaca59a84159d7001a4e5" \ + && gpg --import /tmp/tini-key.asc \ + && rm /tmp/tini-key.asc \ + && gpg --batch --verify /tini.asc /tini \ + && chmod +x /tini \ + && ln -s /tini /usr/local/bin/tini # Add another R version -------------------------------------------------------# - ARG R_VERSION_ALT=3.6.2 RUN apt-get update -qq && \ curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \ @@ -31,17 +49,22 @@ RUN apt-get update -qq && \ # Download RStudio Package Manager ---------------------------------------------# ARG RSPM_VERSION=2023.04.0-6 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu/amd64 +# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address" RUN apt-get update --fix-missing \ - && apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \ + && apt-get install -y --no-install-recommends gdebi-core gpg dpkg-sig \ && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages - && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ + && curl -sL -o /tmp/rstudio-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xfe8564cff1ab93f1728645193f32ee77e331692f" \ + && gpg --import /tmp/rstudio-key.asc \ + && rm /tmp/rstudio-key.asc \ # Post 7/25 packages - && gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ + && curl -sL -o /tmp/posit-key.asc "https://keys.openpgp.org/vks/v1/by-fingerprint/8B65E5A107BBEFE3BA99C59751C0B5BB19F92D60" \ + && gpg --import /tmp/posit-key.asc \ + && rm /tmp/posit-key.asc \ && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig gpg \ + && apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index b7d44a418..964c3e50d 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -10,16 +10,30 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ARG DEBIAN_FRONTEND=noninteractive +ARG TINI_VERSION=0.19.0 ENV PATH /opt/rstudio-pm/bin:$PATH +# Upgrade/install packages ----------------------------------------------------# +RUN apt-get update --fix-missing \ + && apt-get upgrade -yq \ + && apt-get install -yq --no-install-recommends \ + ca-certificates \ + dirmngr \ + gpg \ + gpg-agent \ + && rm -rf /var/lib/apt/lists/* + # Runtime settings ------------------------------------------------------------# -ARG TINI_VERSION=0.18.0 -RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini && \ - chmod +x /usr/local/bin/tini +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc +RUN gpg --update-trustdb \ + && gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ + && gpg --batch --verify /tini.asc /tini \ + && chmod +x /tini \ + && ln -s /tini /usr/local/bin/tini # Add another R version -------------------------------------------------------# - ARG R_VERSION_ALT=3.6.2 RUN apt-get update -qq && \ curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \ @@ -41,7 +55,7 @@ RUN apt-get update --fix-missing \ && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig gpg \ + && apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \