Skip to content

Commit

Permalink
Merge pull request #323 from eitsupi/super-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Mar 15, 2022
2 parents 83651a7 + 1ff0cd9 commit 46fa25b
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 43 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,23 @@ on:
- "master"

jobs:
# yamllint:
# runs-on: ubuntu-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v2
# - name: Run yaml Lint
# uses: actionshub/yamllint@main

mdl:
linter:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run Markdown Lint
uses: actionshub/markdownlint@main

shellcheck:
runs-on: ubuntu-latest
steps:
- name: Check out code
- name: Checkout Code
uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore: scripts
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
LINTER_RULES_PATH: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

make_test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignored:
- "DL3006"
- "DL3059"
10 changes: 10 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"threshold": 0,
"reporters": [
"consoleFull"
],
"ignore": [
"**/stacks/*.json"
],
"absolute": true
}
4 changes: 4 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
linters: with_defaults(
object_usage_linter = NULL,
line_length_linter = line_length_linter(120)
)
13 changes: 13 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
default: true

MD013:
line_length: 120
heading_line_length: 120
code_block_line_length: 120
tables: false

MD024:
allow_different_nesting: true

MD033:
allowed_elements: ["img"]
1 change: 0 additions & 1 deletion .mdlrc

This file was deleted.

4 changes: 2 additions & 2 deletions .yamllint → .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
extends: default

rules:
line-length:
max: 256
max: 120
level: warning
document-start: disable
44 changes: 33 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

### Changes in rocker_scripts

- `userconf.sh`, which is executed when RStudio Server is launched, has been split into `init_set_env.sh` and `init_userconf.sh`. `init_set_env.sh` is also executed when Shiny Server is launched. ([#320](https://github.com/rocker-org/rocker-versioned2/pull/320))
- `userconf.sh`, which is executed when RStudio Server is launched, has been split into `init_set_env.sh` and `init_userconf.sh`.
`init_set_env.sh` is also executed when Shiny Server is launched.
([#320](https://github.com/rocker-org/rocker-versioned2/pull/320))

### Changes in pre-built images

- Environment variables set in the container are now reflected in the sessions on Shiny Server. ([#320](https://github.com/rocker-org/rocker-versioned2/pull/320))
- Change the date of the CRAN mirrors that were set for the R 4.0.0, R 4.0.1, R 4.0.2, and R 4.0.3 images. This reconfiguration was done mechanically, selecting the mirrors just before the release date of the next version of R. ([#328](https://github.com/rocker-org/rocker-versioned2/pull/328))
- Change the date of the CRAN mirrors that were set for the R 4.0.0, R 4.0.1, R 4.0.2, and R 4.0.3 images.
This reconfiguration was done mechanically, selecting the mirrors just before the release date of the next version of R.
([#328](https://github.com/rocker-org/rocker-versioned2/pull/328))
- R 4.0.0: 2020-06-08 to 2020-06-04 (The next version, R 4.0.1 was released on 2020-06-06)
- R 4.0.1: 2020-06-25 to 2020-06-18 (The next version, R 4.0.2 was released on 2020-06-22)
- R 4.0.2: 2020-10-07 to 2020-10-09 (The next version, R 4.0.3 was released on 2020-10-10)
Expand All @@ -19,18 +23,22 @@

### Changes in pre-built images

- In the newly built images, the default password for RStudio Server will be randomly generated when the server is started. ([#298](https://github.com/rocker-org/rocker-versioned2/pull/298))
- In the newly built images, the default password for RStudio Server will be randomly generated when the server is started.
([#298](https://github.com/rocker-org/rocker-versioned2/pull/298))

### Changes in rocker_scripts

- The default locale, `LANG=en_US.UTF-8`, is now set [as recommended](https://github.com/docker-library/docs/tree/master/ubuntu#locales) by the official ubuntu image. ([#302](https://github.com/rocker-org/rocker-versioned2/issues/302), [#313](https://github.com/rocker-org/rocker-versioned2/pull/313))
- The default locale, `LANG=en_US.UTF-8`,
is now set [as recommended](https://github.com/docker-library/docs/tree/master/ubuntu#locales) by the official ubuntu image.
([#302](https://github.com/rocker-org/rocker-versioned2/issues/302), [#313](https://github.com/rocker-org/rocker-versioned2/pull/313))

## 2021-11

### Changes in rocker_scripts

- `install_tidyverse.sh` now assumes that the `install2.r` command has the `--skipmissing` option. ([#283](https://github.com/rocker-org/rocker-versioned2/pull/283))
- The [duckdb](https://github.com/duckdb/duckdb) package is added to the R packages installed by running `install_tidyverse.sh`. ([#283](https://github.com/rocker-org/rocker-versioned2/pull/283))
- The [duckdb](https://github.com/duckdb/duckdb) package is added to the R packages installed by running `install_tidyverse.sh`.
([#283](https://github.com/rocker-org/rocker-versioned2/pull/283))

### Changes in pre-built images

Expand All @@ -40,19 +48,33 @@

### Changes in rocker_scripts

- Add a new script `install_quarto.sh`, to install [quarto-cli](https://github.com/quarto-dev/quarto-cli) and the quarto R package. ([#253](https://github.com/rocker-org/rocker-versioned2/pull/253))
- Add a new script `install_julia.sh`, to install the Julia Language and two R packages which call Julia from R; [JuliaCall](https://github.com/Non-Contradiction/JuliaCall) and [JuliaConnectoR](https://github.com/stefan-m-lenz/JuliaConnectoR). ([#269](https://github.com/rocker-org/rocker-versioned2/pull/269))
- A new script `install2.r`, copied from [eddelbuettel/littler](https://github.com/eddelbuettel/littler) and slightly modified, has been added in the `bin` directory. And add a new script `patch_install_command.sh`, to replace the symbolic link of `install2.r` command with rocker script version of `install2.r`. ([#275](https://github.com/rocker-org/rocker-versioned2/pull/275))
- Add a new script `install_quarto.sh`,
to install [quarto-cli](https://github.com/quarto-dev/quarto-cli) and the quarto R package.
([#253](https://github.com/rocker-org/rocker-versioned2/pull/253))
- Add a new script `install_julia.sh`, to install the Julia Language and two R packages which call Julia from R;
[JuliaCall](https://github.com/Non-Contradiction/JuliaCall) and [JuliaConnectoR](https://github.com/stefan-m-lenz/JuliaConnectoR).
([#269](https://github.com/rocker-org/rocker-versioned2/pull/269))
- A new script `install2.r`, copied from [eddelbuettel/littler](https://github.com/eddelbuettel/littler) and slightly modified,
has been added in the `bin` directory. And add a new script `patch_install_command.sh`,
to replace the symbolic link of `install2.r` command with rocker script version of `install2.r`.
([#275](https://github.com/rocker-org/rocker-versioned2/pull/275))
- `install2.r` gets a new option `--skipmissing`. ([#275](https://github.com/rocker-org/rocker-versioned2/pull/275))

### Changes in pre-built images

- New builds of `rocker/verse` and `rocker/ml-verse` for R >= 4.1.0 will install [quarto-cli](https://github.com/quarto-dev/quarto-cli) and the quarto R package. ([#253](https://github.com/rocker-org/rocker-versioned2/pull/253))
- New builds of `rocker/verse` and `rocker/ml-verse` for R >= 4.1.0 will install [quarto-cli](https://github.com/quarto-dev/quarto-cli)
and the quarto R package.
([#253](https://github.com/rocker-org/rocker-versioned2/pull/253))
- The `install2.r` command has been replaced by rocker scripts version of `install2.r`. ([#275](https://github.com/rocker-org/rocker-versioned2/pull/275))

## 2021-06

### Changes in pre-built images

- The time zone setting for R, which was hardcoded as `TZ=Etc/UTC` in `Renviron.site`, has been removed. The environment variable `TZ` set in the container will be used instead. ([#151](https://github.com/rocker-org/rocker-versioned2/issues/151), [#186](https://github.com/rocker-org/rocker-versioned2/pull/186))
- Environment variables set in the container are now reflected in the sessions on RStudio Server. ([#186](https://github.com/rocker-org/rocker-versioned2/pull/186), [#189](https://github.com/rocker-org/rocker-versioned2/pull/189), [#190](https://github.com/rocker-org/rocker-versioned2/pull/190))
- The time zone setting for R, which was hardcoded as `TZ=Etc/UTC` in `Renviron.site`, has been removed.
The environment variable `TZ` set in the container will be used instead.
([#151](https://github.com/rocker-org/rocker-versioned2/issues/151), [#186](https://github.com/rocker-org/rocker-versioned2/pull/186))
- Environment variables set in the container are now reflected in the sessions on RStudio Server.
([#186](https://github.com/rocker-org/rocker-versioned2/pull/186),
[#189](https://github.com/rocker-org/rocker-versioned2/pull/189),
[#190](https://github.com/rocker-org/rocker-versioned2/pull/190))
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Version-stable Rocker images <img src="https://avatars0.githubusercontent.com/u/9100160?v=3&s=200" align="right">

<!-- badges: start -->

[![license](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://opensource.org/licenses/GPL-2.0)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Update container definition files](https://github.com/rocker-org/rocker-versioned2/actions/workflows/dockerfiles.yml/badge.svg)](https://github.com/rocker-org/rocker-versioned2/actions/workflows/dockerfiles.yml)
[![Build & Push Core images](https://github.com/rocker-org/rocker-versioned2/actions/workflows/core.yml/badge.svg)](https://github.com/rocker-org/rocker-versioned2/actions/workflows/core.yml)
[![Build & Push R devel images and RStudio daily build images](https://github.com/rocker-org/rocker-versioned2/actions/workflows/devel.yml/badge.svg)](https://github.com/rocker-org/rocker-versioned2/actions/workflows/devel.yml)

Visit [rocker-project.org](https://rocker-project.org) for more about available Rocker images, configuration, and use.
<!-- badges: end -->

# Version-stable Rocker images <img src="https://avatars0.githubusercontent.com/u/9100160?v=3&s=200" align="right">
Visit [rocker-project.org](https://rocker-project.org) for more about available Rocker images, configuration, and use.

## Overview

Expand Down Expand Up @@ -69,7 +73,7 @@ and the `latest-daily` tag, which installs the RStudio daily build.

## Modifying and extending images

Check the website for common methods for Rocker images. <https://www.rocker-project.org/use/extending/>
Check the Rocker project site for common methods for Rocker images. <https://www.rocker-project.org/use/extending/>

### Install R packages

Expand All @@ -82,7 +86,8 @@ consider using `r-base` or [`rocker/r-bspm`](https://github.com/rocker-org/bspm)

### Rocker scripts

The Docker images built from this repository describe the software installation method in standalone scripts rather than directly in the Dockerfiles.
The Docker images built from this repository describe the software installation method in standalone scripts
rather than directly in the Dockerfiles.
These files are under [the `scripts` directory](./scripts/), and these files are copied in all Docker images,
under a top-level `/rocker_scripts` directory.
This allows users to extend images by selecting additional modules to install on top of any pre-built images.
Expand All @@ -95,7 +100,8 @@ FROM rocker/rstudio:4.0.0
RUN /rocker_scripts/install_shiny_server.sh
```

Install scripts can generally take a version as a first argument or ingest an environment variable to specify the version to install.
Install scripts can generally take a version as a first argument or ingest an environment variable
to specify the version to install.
So to install fixed versions, one can use either of the following syntaxes:

```Dockerfile
Expand All @@ -109,17 +115,21 @@ FROM rocker/rstudio:4.0.0
RUN /rocker_scripts/install_shiny_server.sh 1.5.14.948
```

RStudio Server and Shiny Server are managed by [the S6 supervisor system](https://github.com/just-containers/s6-overlay), which allows containers to manage multiple background processes gracefully.
RStudio Server and Shiny Server are managed by [the S6 supervisor system](https://github.com/just-containers/s6-overlay),
which allows containers to manage multiple background processes gracefully.

_Note: No longer support `ADD=` runtime triggers for installing Shiny or similar modules,
which is used for R <= 3.6.3 images._

## Build system
## Build images

### Container definition files

Dockerfiles and docker-bake.json files, which define the pre-built images, are in [the `dockerfiles` folder](./dockerfiles/) and [the `bakefiles` folder](./bakefiles/).
And, these files are created from the JSON files under [the `stacks` folder](./stacks/) by the build scripts under [the `build` folder](./build/).
Dockerfiles and docker-bake.json files, which define the pre-built images,
are in [the `dockerfiles` folder](./dockerfiles/) and [the `bakefiles` folder](./bakefiles/).
And,
these files are created from the JSON files under [the `stacks` folder](./stacks/)
by the build scripts under [the `build` folder](./build/).

When a new version of R or RStudio is released, GitHub Actions will automatically create a Pull Request to update these files.

Expand Down

0 comments on commit 46fa25b

Please sign in to comment.