-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit (carried over from rocker-org/rocker/r-ubuntu)
- Loading branch information
0 parents
commit 8256538
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
schedule: | ||
- cron: "22 3 25 * *" | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.tag }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { directory: bionic, tag: '18.04' } | ||
- { directory: focal, tag: '20.04' } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
#- name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ${{ matrix.config.directory }} | ||
tags: rocker/r-ubuntu:${{ matrix.config.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
r-ubuntu -- 'r-base' for Ubuntu LTS | ||
=================================== | ||
|
||
This Dockerfile is close to the ['r-base'](https://github.com/rocker-org/rocker/tree/master/r-base) container | ||
for Rocker -- which is the same container as the official ['r-base'](https://hub.docker.com/_/r-base) container for R -- but based on | ||
Ubuntu LTS. And while 'r-base' uses Debian testing, this container is based on | ||
the LTS release and connects to the [PPA by Michael Rutter](https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5) with over | ||
4,000 r-cran-* packages. | ||
|
||
To install, use the explicit LTS tag---currently 18.04---when pulling | ||
|
||
``` | ||
docker pull r-ubuntu:18.04 | ||
``` | ||
|
||
as we do not want to use latest (which may suggest an interim Ubuntu release | ||
between the bi-annual LTS schedule). | ||
|
||
As always, this is work in progress -- please come and talk to @eddelbuettel and | ||
@cboettig (via GitHub issue tickets) about how to get involved. | ||
|
||
Documentation is being added at the [Wiki](https://github.com/rocker-org/rocker/wiki). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Emacs, make this -*- mode: sh; -*- | ||
|
||
FROM ubuntu:bionic | ||
|
||
LABEL org.label-schema.license="GPL-2.0" \ | ||
org.label-schema.vcs-url="https://github.com/rocker-org/r-ubuntu" \ | ||
org.label-schema.vendor="Rocker Project" \ | ||
maintainer="Dirk Eddelbuettel <[email protected]>" | ||
|
||
## Set a default user. Available via runtime flag `--user docker` | ||
## Add user to 'staff' group, granting them write privileges to /usr/local/lib/R/site.library | ||
## User should also have & own a home directory (for rstudio or linked volumes to work properly). | ||
RUN useradd docker \ | ||
&& mkdir /home/docker \ | ||
&& chown docker:docker /home/docker \ | ||
&& addgroup docker staff | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
software-properties-common \ | ||
dirmngr \ | ||
ed \ | ||
less \ | ||
locales \ | ||
vim-tiny \ | ||
wget \ | ||
ca-certificates \ | ||
&& add-apt-repository --enable-source --yes "ppa:marutter/rrutter4.0" \ | ||
&& add-apt-repository --enable-source --yes "ppa:c2d4u.team/c2d4u4.0+" | ||
|
||
## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 | ||
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ | ||
&& locale-gen en_US.utf8 \ | ||
&& /usr/sbin/update-locale LANG=en_US.UTF-8 | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
|
||
## This was not needed before but we need it now | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
## Otherwise timedatectl will get called which leads to 'no systemd' inside Docker | ||
ENV TZ UTC | ||
|
||
# Now install R and littler, and create a link for littler in /usr/local/bin | ||
# Default CRAN repo is now set by R itself, and littler knows about it too | ||
# r-cran-docopt is not currently in c2d4u so we install from source | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
littler \ | ||
r-base \ | ||
r-base-dev \ | ||
r-recommended \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ | ||
&& install.r docopt \ | ||
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Emacs, make this -*- mode: sh; -*- | ||
|
||
FROM ubuntu:focal | ||
|
||
LABEL org.label-schema.license="GPL-2.0" \ | ||
org.label-schema.vcs-url="https://github.com/rocker-org/r-ubuntu" \ | ||
org.label-schema.vendor="Rocker Project" \ | ||
maintainer="Dirk Eddelbuettel <[email protected]>" | ||
|
||
## Set a default user. Available via runtime flag `--user docker` | ||
## Add user to 'staff' group, granting them write privileges to /usr/local/lib/R/site.library | ||
## User should also have & own a home directory (for rstudio or linked volumes to work properly). | ||
RUN useradd docker \ | ||
&& mkdir /home/docker \ | ||
&& chown docker:docker /home/docker \ | ||
&& addgroup docker staff | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
software-properties-common \ | ||
dirmngr \ | ||
ed \ | ||
less \ | ||
locales \ | ||
vim-tiny \ | ||
wget \ | ||
ca-certificates \ | ||
&& add-apt-repository --enable-source --yes "ppa:marutter/rrutter4.0" \ | ||
&& add-apt-repository --enable-source --yes "ppa:c2d4u.team/c2d4u4.0+" | ||
|
||
## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 | ||
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ | ||
&& locale-gen en_US.utf8 \ | ||
&& /usr/sbin/update-locale LANG=en_US.UTF-8 | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
|
||
## This was not needed before but we need it now | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
## Otherwise timedatectl will get called which leads to 'no systemd' inside Docker | ||
ENV TZ UTC | ||
|
||
# Now install R and littler, and create a link for littler in /usr/local/bin | ||
# Default CRAN repo is now set by R itself, and littler knows about it too | ||
# r-cran-docopt is not currently in c2d4u so we install from source | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
littler \ | ||
r-base \ | ||
r-base-dev \ | ||
r-recommended \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ | ||
&& ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ | ||
&& install.r docopt \ | ||
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
CMD ["bash"] |