Skip to content

Commit

Permalink
Merge pull request #121 from rstudio/jmw/posit-dockerhub
Browse files Browse the repository at this point in the history
chore: rstudio/r-base to posit/r-base
  • Loading branch information
jmwoliver authored Jan 31, 2025
2 parents 2b265b0 + 4c8ac35 commit 2083ca0
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 13 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
driver: docker
install: true

- name: Login to DockerHub
- name: Login to Posit DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -119,7 +119,18 @@ jobs:
run: |
make test-all
- name: Push images
- name: Push Posit images
if: ${{ github.ref == 'refs/heads/main' || inputs.publish_images }}
run: |
make push-all
- name: Login to RStudio DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.RSTUDIO_DOCKERHUB_USERNAME }}
password: ${{ secrets.RSTUDIO_DOCKERHUB_TOKEN }}

- name: Push RStudio images
if: ${{ github.ref == 'refs/heads/main' || inputs.publish_images }}
run: |
make push-all-rstudio
2 changes: 1 addition & 1 deletion Dockerfile-centos.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rstudio/r-base
ARG BASE_IMAGE=posit/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-debian.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rstudio/r-base
ARG BASE_IMAGE=posit/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-opensuse.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rstudio/r-base
ARG BASE_IMAGE=posit/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-rockylinux.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rstudio/r-base
ARG BASE_IMAGE=posit/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ubuntu.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rstudio/r-base
ARG BASE_IMAGE=posit/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BASE_IMAGE ?= rstudio/r-base
BASE_IMAGE ?= posit/r-base
BASE_IMAGE_RSTUDIO ?= rstudio/r-base
VERSIONS ?= 3.1 3.2 3.3 3.4 3.5 3.6 4.0 4.1 4.2 4.3 4.4 devel next
VARIANTS ?= focal jammy noble bullseye bookworm centos7 rockylinux8 rockylinux9 opensuse155 opensuse156

Expand Down Expand Up @@ -60,6 +61,10 @@ push-$(version)-$(variant):
docker push $(BASE_IMAGE):$(version)-$(variant)
IMAGE_NAME=$(BASE_IMAGE):$(version)-$(variant) DOCKER_REPO=$(BASE_IMAGE) bash ./$(version)/$(variant)/hooks/post_push

push-rstudio-$(version)-$(variant):
docker push $(BASE_IMAGE_RSTUDIO):$(version)-$(variant)
IMAGE_NAME=$(BASE_IMAGE_RSTUDIO):$(version)-$(variant) DOCKER_REPO=$(BASE_IMAGE_RSTUDIO) bash ./$(version)/$(variant)/hooks/post_push

BUILD_R_IMAGES += build-$(version)-$(variant)
REBUILD_R_IMAGES += rebuild-$(version)-$(variant)
TEST_R_IMAGES += test-$(version)-$(variant)
Expand Down Expand Up @@ -109,12 +114,16 @@ pull-$(version)-$(variant):
push-$(version)-$(variant):
docker push $(BASE_IMAGE):$(version)-$(variant)

push-rstudio-$(version)-$(variant):
docker push $(BASE_IMAGE_RSTUDIO):$(version)-$(variant)

ifeq (yes,$(INCLUDE_PATCH_VERSIONS))
BUILD_R_IMAGES += build-$(version)-$(variant)
REBUILD_R_IMAGES += rebuild-$(version)-$(variant)
TEST_R_IMAGES += test-$(version)-$(variant)
PULL_R_IMAGES += pull-$(version)-$(variant)
PUSH_R_IMAGES += push-$(version)-$(variant)
PUSH_R_IMAGES_RSTUDIO += push-rstudio-$(version)-$(variant)
endif
endef

Expand All @@ -134,5 +143,7 @@ pull-all: $(PULL_R_IMAGES)

push-all: $(PUSH_R_IMAGES)

push-all-rstudio: $(PUSH_R_IMAGES_RSTUDIO)

print-variants:
@echo $(VARIANTS)
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Posit R Docker Images

!!!warning These images have moved to `posit/r-base` on Docker Hub. The images at `rstudio/r-base` will continue to be updated for now, but will be deprecated in the future.

[![R Docker](https://github.com/rstudio/r-docker/actions/workflows/build.yml/badge.svg)](https://github.com/rstudio/r-docker/actions/workflows/build.yml)

Posit creates and [distributes an opinionated set of R
Expand All @@ -19,14 +21,14 @@ refer to the [Rocker project](https://www.rocker-project.org/).
These images can be used to execute R:

```
docker run --rm -it rstudio/r-base:4.3-jammy
docker run --rm -it posit/r-base:4.3-jammy
```

These images can also be used as the basis for other custom images. To get
started, use an image as the base in a Dockerfile:

```dockerfile
FROM rstudio/r-base:4.3-jammy
FROM posit/r-base:4.3-jammy
```

### Releases and Tags
Expand All @@ -35,9 +37,9 @@ The images follow these tag patterns:

| Pattern | Example | Description |
| --- | --- | --- |
| `rstudio/r-base:distro` | `rstudio/r-base:focal` | Base operating system + system libraries required by R. |
| `rstudio/r-base:x.y.z-distro` | `rstudio/r-base:4.0.3-focal` | R version `x.y.z` on the specified OS |
| `rstudio/r-base:x.y-distro` | `rstudio/r-base:4.0-focal` | Latest R version `x.y.z` on the specified OS, where the patch version `z` floats over time. For example, if R 4.0.4 is released, `rstudio/r-base:4.0-focal` would switch from R 4.0.3 to R 4.0.4.|
| `posit/r-base:distro` | `posit/r-base:focal` | Base operating system + system libraries required by R. |
| `posit/r-base:x.y.z-distro` | `posit/r-base:4.0.3-focal` | R version `x.y.z` on the specified OS |
| `posit/r-base:x.y-distro` | `posit/r-base:4.0-focal` | Latest R version `x.y.z` on the specified OS, where the patch version `z` floats over time. For example, if R 4.0.4 is released, `posit/r-base:4.0-focal` would switch from R 4.0.3 to R 4.0.4.|


The following distributions are supported:
Expand Down

0 comments on commit 2083ca0

Please sign in to comment.