Skip to content

Commit

Permalink
README.md and Dockerfile tweaks (#9)
Browse files Browse the repository at this point in the history
* docs(README.md): Explicitly mention which R binary to use

* refactor: Update default CMD to `bash`

* Previously inherited a default `CMD ["R"]` which put users
  in the non-instrumented R-release

* refactor: Don't use deprecated MAINTAINER

* Previously docker would emit following warning:

  `WARN: MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label`

* "supposed" to instead use `org.opencontainers.image.authors` which is a freeform string:

  + https://docs.docker.com/reference/build-checks/maintainer-deprecated/
  + https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys

* refactor: Use "ENV key=value"

* Previously docker would warn:

  `LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format`
  • Loading branch information
trevorld authored Jan 7, 2025
1 parent 0d6c135 commit fdde772
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
FROM r-base:latest

## This handle reaches Carl and Dirk
MAINTAINER "Carl Boettiger and Dirk Eddelbuettel" [email protected]
LABEL org.opencontainers.image.authors="Carl Boettiger and Dirk Eddelbuettel <[email protected]>"


## Remain current
RUN apt-get update -qq \
Expand Down Expand Up @@ -106,12 +107,12 @@ RUN echo 'options("repos"="http://cloud.r-project.org")' >> /usr/local/lib/R/etc

## More verbose UBSAN/SAN output (cf #3) -- this is still somewhat speculative
## Entry copied from Prof Ripley's setup described at http://www.stats.ox.ac.uk/pub/bdr/memtests/README.txt
ENV ASAN_OPTIONS 'alloc_dealloc_mismatch=0:detect_leaks=0:detect_odr_violation=0'
ENV ASAN_OPTIONS='alloc_dealloc_mismatch=0:detect_leaks=0:detect_odr_violation=0'

RUN cd /usr/local/bin \
&& mv R Rdevel \
&& mv Rscript Rscriptdevel \
&& ln -s Rdevel RD \
&& ln -s Rscriptdevel RDscript


CMD ["bash"]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ and to
[Using the Undefined Behaviour Sanitizer](http://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-Undefined-Behaviour-Sanitizer).

Both require a particularly instrumented binary of R. This repository
provides a Docker container with such a binary, based on the R-devel sources.
provides a Docker container with such a binary, based on the R-devel sources:

* This particularly instrumented binary of `R` is available on the path as `Rdevel` and for convenience is also symbolically linked on the path as `RD`.
* The particularly instrumented versions of `Rscript` on the path are `Rscriptdevel` with symbolic link `RDscript` for convenience.
* The `R` and `Rscript` binaries in the path of this container are inherited from the `r-base/latest` container and are **not** particularly instrumented with sanitizer support.

## Rocker-Org

Expand Down

0 comments on commit fdde772

Please sign in to comment.