├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── NEWS.md ├── README.md ├── RELEASE.md ├── r-session-complete ├── bionic │ ├── .env │ ├── Dockerfile │ ├── docker-compose.test.yml │ ├── hooks │ │ ├── build │ │ ├── post_push │ │ └── pre_build │ └── test │ │ ├── goss.yaml │ │ └── run_tests.sh └── centos7 │ ├── .env │ ├── Dockerfile │ ├── docker-compose.test.yml │ ├── hooks │ ├── build │ ├── post_push │ └── pre_build │ └── test │ ├── goss.yaml │ └── run_tests.sh └── scripts ├── docker-build.sh └── docker-tag-and-push.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .Rproj.user 3 | .env.bak 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | language: generic 3 | 4 | notifications: 5 | email: false 6 | 7 | env: 8 | global: 9 | - secure: "Rh/rekqMoEn0c3cSf4JFi8gxIJbBxvGA4itvBCZxathzMlzv2v5dZr2VVasdu1SKHvmd830seu1uGuwEMAR45l16xYWT+Vzsm22dGRDcu6Euo7HLrg/BwN0Jf6cQ4E3fEFIjGgT0223XwST5YGRjIv1pec8A6wAgxmSA0LWIuZG3pqw0dSTPgWk0YbL3dLnrCm6Q8jJkdTu1dYMYad3vLd6bSVZsEri2J+c6zp933CTeAektUO16B2XMjgvg3G1cO/CtOmu/IAxV/hRnV1FJqL0JoymR/OU79Xqv6n/gDYaUGCQZqG/pgKfAPsXfyfT4yalCcPipymBXAhobfahYaMIDuzMPde3t1m7h2OnboGRjQJiHlfpK+J7ZMQyeTf3UTYR0NuDXtoWpZm2d5yW148XGjSxLudb5I3tjqboEXQi/zuuIbSTzrxWjobYmNPtHSw8dA/DFPEcUDhYWdVn3ERIyx7pY5TrWQ0OfFTX+vz0nZXj3Re925NZic6felY1udut0c9hd92lEs79UAk11x6/Mb5b4RV/vsuOSiTdoimA9UGY5ec07HYP5cHQtexwwu6otfUgUGGGp8ExYg6/Pskv5+lrd+p6iQuOPKsPyu3pTT80fpmup4GRqkFi9/hj6fKCIxfCn9Zxo4+gA1ybTaYBaHgm285rw0Li8ZYA3Ea0=" # DOCKER_USERNAME 10 | - secure: "UFk2c3haQPpyUd42gmeZTIUp2CD9D/RxrQsExBdpU9UErQyj2Wsc4WXCNu6mdaqXhDz22LYtH+3arzRkpY2ZuKHO27vMKLQwQT0WZjZNqZr2FAmx2DMp2gAMD83bCACO9IrHojDXA+k22gopL1XIkhTa+wIuGKGvP/YPxTC1EVT3+56O2b1H6TXQo466JYV0E9artpXvwrwoDVvIX0s0NkRdfJFIKFgg0/Kd4O8QyPBfINVEiyBUGi2RIzHJ2ldtPBijEam+BsadlCrbe+f2uP+JHnCvhMKiO6hu9Kx0ME+hC4mBPHXciEPm4iZsfQkV1R6IHIXmE/P42U0T6U8XUvDSid6iUGTbshqAtvN33RfBGwLP9uV2y+X2WqI6E1SpW6x8WLBfqd6ndffRuAaoICaJS6jPC7YSGYEEwE+dR3dwtJXbzLq2HAcHHVYj9AFKWfGtm13T9YtvnzsB78zq0DtJbxeOOMxdwx4gOVcrDu0DRGpiU9eZqhIDGkRkDznB/ozvnkgNAs66urLgjeSwlw/+PjlykDp86GV52ODAiJEsvXFpGkJUr0gGpPUcQ5p4JPYAlktkrwH4vvQJ+eFUHJP5h1FUUcGfLMF557JqwOoYPOdFfvNm5Sux3fTpjR9EUA0jAhcKS8Npj6fLioI3JBik1RzqtRNQY+j/9VhZMCE=" # DOCKER_PASSWORD 11 | matrix: 12 | - DISTRO=centos7 13 | - DISTRO=bionic 14 | 15 | script: bash scripts/docker-build.sh 16 | 17 | deploy: 18 | provider: script 19 | script: bash scripts/docker-tag-and-push.sh 20 | on: 21 | tags: true 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 RStudio PBC 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | R_VERSION ?= 3.6.2 2 | 3 | RSP_VERSION ?= 1.4.1717-3 4 | CODE_SERVER_VERSION ?= 3.2.0 5 | 6 | SHELL := bash 7 | .ONESHELL: 8 | .SHELLFLAGS := -eu -o pipefail -c 9 | .DELETE_ON_ERROR: 10 | MAKEFLAGS += --warn-undefined-variables 11 | MAKEFLAGS += --no-builtin-rules 12 | 13 | update-versions: ## Update the version files for all products 14 | @sed -i '' "s/^RSP_VERSION=.*/RSP_VERSION=${RSP_VERSION}/g" r-session-complete/bionic/.env 15 | @sed -i '' "s/^RSP_VERSION=.*/RSP_VERSION=${RSP_VERSION}/g" r-session-complete/centos7/.env 16 | @sed -i '' "s/^ARG RSP_VERSION=.*/ARG RSP_VERSION=${RSP_VERSION}/g" r-session-complete/bionic/Dockerfile 17 | @sed -i '' "s/^ARG RSP_VERSION=.*/ARG RSP_VERSION=${RSP_VERSION}/g" r-session-complete/centos7/Dockerfile 18 | 19 | build: 20 | find r-session-complete -type d -maxdepth 1 -mindepth 1 -exec docker build {} -t '{}' \; 21 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # 1.4.1106-5 2 | 3 | ## Overview 4 | 5 | R is at `/opt/R/4.0.2/bin/R` 6 | python is at `/opt/python/3.7.7/bin/python` 7 | jupyter is at `/opt/python/3.7.7/bin/jupyter` 8 | code-server is at `/opt/code-server/code-server` 9 | 10 | ## Changes 11 | 12 | - `BREAKING`: Changed code-server version and insulated against version upgrades in the future. To update: 13 | change: 14 | 15 | _vscode.conf_ 16 | ``` 17 | enabled=1 18 | exe=/opt/code-server/code-server-3.2.0-linux-x86_64/code-server 19 | ``` 20 | to: 21 | _vscode.conf_ 22 | ``` 23 | enabled=1 24 | exe=/opt/code-server/code-server 25 | ``` 26 | 27 | - Update Drivers to version 1.7.0 28 | 29 | # 1.4.1103-4 30 | 31 | ## Overview 32 | 33 | R is at `/opt/R/4.0.2/bin/R` 34 | python is at `/opt/python/3.7.7/bin/python` 35 | jupyter is at `/opt/python/3.7.7/bin/jupyter` 36 | code-server is at `/opt/code-server/code-server-3.2.0-linux-x86_64/code-server` 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED 2 | 3 | This repository has been deprecated. There will be no further updates. 4 | 5 | Please see the updated source in 6 | the [rstudio/rstudio-docker-products](https://github.com/rstudio/rstudio-docker-products) repository 7 | 8 | Specifically, the images that lived here are now 9 | maintained [here](https://github.com/rstudio/rstudio-docker-products/tree/main/r-session-complete) 10 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release Process for Docker Images 2 | 3 | When builds on master are passing and you are ready to release a new version of 4 | the image on Docker Hub, you can tag a release on master using the following 5 | steps: 6 | 7 | 1. Update versions of RSP session components in Dockerfiles in a PR. 8 | 2. Update versions of R, Python, Pro Drivers, and other components as needed. 9 | 3. Merge PR when the build passes. 10 | 4. Run the following commands on the `master` branch, editing the version string 11 | as needed (where `1.3.XXXX-X` is the RSP version): 12 | 13 | ``` 14 | export VERSION=1.3.XXXX-X 15 | git commit -am "Release for image version ${VERSION}" --allow-empty 16 | git tag -a ${VERSION} -m "${VERSION}" 17 | git push origin ${VERSION} 18 | git push 19 | ``` 20 | 21 | Note: Add the `-preview` suffix to the version string for tagged images that 22 | correspond to preview release versions of RSP. Images related to preview 23 | builds are intended for testing purposes, subject to being removed, do not 24 | fall under our support agreement, and are not recommended for use in 25 | production. 26 | 27 | 5. The new images will get built on Travis CI and get pushed to the 28 | [rstudio/r-session-complete](https://hub.docker.com/r/rstudio/r-session-complete) 29 | repository on Docker Hub. 30 | -------------------------------------------------------------------------------- /r-session-complete/bionic/.env: -------------------------------------------------------------------------------- 1 | RSP_VERSION=1.4.1717-3 2 | RSP_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 3 | RSP_NAME=rstudio-workbench 4 | -------------------------------------------------------------------------------- /r-session-complete/bionic/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:bionic 2 | 3 | LABEL maintainer="RStudio Docker " 4 | 5 | # Set versions and platforms 6 | ARG R_VERSION=4.0.2 7 | ARG MINICONDA_VERSION=py37_4.8.3 8 | ARG PYTHON_VERSION=3.7.7 9 | ARG DRIVERS_VERSION=1.7.0 10 | 11 | # Install RStudio Server Pro session components -------------------------------# 12 | 13 | RUN apt-get update -y && \ 14 | DEBIAN_FRONTEND=noninteractive apt-get install -y \ 15 | curl \ 16 | wget \ 17 | gdebi \ 18 | libcurl4-gnutls-dev \ 19 | libssl1.0.0 \ 20 | libssl-dev \ 21 | libuser \ 22 | libuser1-dev \ 23 | libpq-dev \ 24 | rrdtool && \ 25 | rm -rf /var/lib/apt/lists/* 26 | 27 | ARG RSP_VERSION=1.4.1717-3 28 | ARG RSP_NAME=rstudio-workbench 29 | ARG RSP_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/bionic/amd64 30 | RUN apt-get update --fix-missing \ 31 | && apt-get install -y gdebi-core \ 32 | && curl -O ${RSP_DOWNLOAD_URL}/${RSP_NAME}-${RSP_VERSION}-amd64.deb \ 33 | && gdebi --non-interactive ${RSP_NAME}-${RSP_VERSION}-amd64.deb \ 34 | && rm ${RSP_NAME}-${RSP_VERSION}-amd64.deb \ 35 | && apt-get autoremove -y \ 36 | && apt-get clean \ 37 | && rm -rf /var/lib/apt/lists/* 38 | 39 | EXPOSE 8788/tcp 40 | 41 | # Install additional system packages ------------------------------------------# 42 | 43 | RUN apt-get update -y && \ 44 | DEBIAN_FRONTEND=noninteractive apt-get install -y \ 45 | git \ 46 | libssl1.0.0 \ 47 | libuser \ 48 | libxml2-dev \ 49 | subversion && \ 50 | rm -rf /var/lib/apt/lists/* 51 | 52 | # Install R -------------------------------------------------------------------# 53 | 54 | RUN curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION}_1_amd64.deb && \ 55 | apt-get update && \ 56 | DEBIAN_FRONTEND=noninteractive gdebi --non-interactive r-${R_VERSION}_1_amd64.deb && \ 57 | rm -rf r-${R_VERSION}_1_amd64.deb && \ 58 | rm -rf /var/lib/apt/lists/* 59 | 60 | RUN ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R && \ 61 | ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript 62 | 63 | # Install R packages ----------------------------------------------------------# 64 | 65 | RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("devtools", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' && \ 66 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("tidyverse", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' && \ 67 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("shiny", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' && \ 68 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("rmarkdown", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' && \ 69 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("plumber", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' 70 | 71 | # Install Python --------------------------------------------------------------# 72 | 73 | RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh && \ 74 | bash Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -bp /opt/python/${PYTHON_VERSION} && \ 75 | /opt/python/${PYTHON_VERSION}/bin/pip install virtualenv && \ 76 | rm -rf Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh 77 | 78 | ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" 79 | 80 | # Install Python packages -----------------------------------------------------# 81 | 82 | RUN /opt/python/${PYTHON_VERSION}/bin/pip install \ 83 | altair \ 84 | beautifulsoup4 \ 85 | bokeh \ 86 | cloudpickle \ 87 | cython \ 88 | dash \ 89 | dask \ 90 | flask \ 91 | gensim \ 92 | keras \ 93 | matplotlib \ 94 | nltk \ 95 | numpy \ 96 | pandas \ 97 | pillow \ 98 | plotly \ 99 | pyarrow \ 100 | requests \ 101 | scipy \ 102 | scikit-image \ 103 | scikit-learn \ 104 | scrapy \ 105 | seaborn \ 106 | spacy \ 107 | sqlalchemy \ 108 | statsmodels \ 109 | streamlit \ 110 | tensorflow \ 111 | xgboost 112 | 113 | # Install Jupyter Notebook and RSP/RSC Notebook Extensions and Packages -------# 114 | 115 | RUN /opt/python/${PYTHON_VERSION}/bin/pip install \ 116 | jupyter \ 117 | jupyterlab \ 118 | rsp_jupyter \ 119 | rsconnect_jupyter \ 120 | rsconnect_python 121 | 122 | RUN /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter && \ 123 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter && \ 124 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter && \ 125 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter && \ 126 | /opt/python/${PYTHON_VERSION}/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter 127 | 128 | # Install VSCode code-server --------------------------------------------------# 129 | 130 | RUN rstudio-server install-vs-code /opt/code-server/ 131 | 132 | # Install RStudio Professional Drivers ----------------------------------------# 133 | 134 | RUN apt-get update -y && \ 135 | DEBIAN_FRONTEND=noninteractive apt-get install -y unixodbc unixodbc-dev gdebi && \ 136 | rm -rf /var/lib/apt/lists/* 137 | 138 | RUN curl -O https://drivers.rstudio.org/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb && \ 139 | apt-get update && \ 140 | DEBIAN_FRONTEND=noninteractive gdebi --non-interactive rstudio-drivers_${DRIVERS_VERSION}_amd64.deb && \ 141 | rm -rf /var/lib/apt/lists/* && \ 142 | cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini 143 | 144 | RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' 145 | 146 | # Locale configuration --------------------------------------------------------# 147 | 148 | RUN apt-get update -y && \ 149 | DEBIAN_FRONTEND=noninteractive apt-get install -y locales && \ 150 | rm -rf /var/lib/apt/lists/* 151 | 152 | RUN locale-gen en_US.UTF-8 153 | ENV LANG en_US.UTF-8 154 | ENV LANGUAGE en_US:en 155 | ENV LC_ALL en_US.UTF-8 156 | -------------------------------------------------------------------------------- /r-session-complete/bionic/docker-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: '2.3' 2 | services: 3 | 4 | sut: 5 | image: $IMAGE_NAME 6 | command: /run_tests.sh 7 | entrypoint: [] 8 | environment: 9 | # uses .env by default 10 | - RSP_VERSION 11 | - CODE_SERVER_VERSION 12 | volumes: 13 | - "./test/run_tests.sh:/run_tests.sh" 14 | - "./test/goss.yaml:/tmp/goss.yaml" 15 | -------------------------------------------------------------------------------- /r-session-complete/bionic/hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo '--> Showing .env file' 6 | cat .env 7 | 8 | # use xargs -0 (BSD) or xargs -d '\n' (GNU) to read env vars with spaces 9 | # https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs 10 | export $(grep -v '^#' .env | xargs) 11 | 12 | echo '--> Showing Environment Variables' 13 | echo "RSP_VERSION=${RSP_VERSION}" 14 | echo "RSP_DOWNLOAD_URL=${RSP_DOWNLOAD_URL}" 15 | echo "IMAGE_NAME=${IMAGE_NAME}" 16 | echo "DOCKERFILE_PATH=${DOCKERFILE_PATH}" 17 | 18 | echo "" 19 | echo "SOURCE_BRANCH=${SOURCE_BRANCH}" 20 | echo "SOURCE_COMMIT=${SOURCE_COMMIT}" 21 | echo "COMMIT_MSG=${COMMIT_MSG}" 22 | echo "DOCKER_REPO=${DOCKER_REPO}" 23 | echo "DOCKER_TAG=${DOCKER_TAG}" 24 | echo "RSP_PLATFORM=${RSP_PLATFORM}" 25 | 26 | docker build --build-arg RSP_NAME=${RSP_NAME} --build-arg RSP_VERSION=${RSP_VERSION} --build-arg RSP_DOWNLOAD_URL=${RSP_DOWNLOAD_URL} -f $DOCKERFILE_PATH -t $IMAGE_NAME . 27 | -------------------------------------------------------------------------------- /r-session-complete/bionic/hooks/post_push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # adapted from: https://windsock.io/automated-docker-image-builds-with-multiple-tags/ 3 | 4 | set -e 5 | 6 | # Parse image name for repo name 7 | tagStart=$(expr index "$IMAGE_NAME" :) 8 | imageStart=$(expr index "$IMAGE_NAME" /) 9 | 10 | repoName=${IMAGE_NAME:0:tagStart-1} 11 | imageName=${IMAGE_NAME:imageStart:${#IMAGE_NAME}-tagStart-1} 12 | 13 | # Only tag version for "preview" repository, "bionic" and "centos7" images 14 | if [ "${DOCKER_TAG}" != "bionic" ] && [ "${DOCKER_TAG}" != "centos7" ] && [[ "${repoName}" != *"preview"* ]]; then 15 | echo "Non-release build - exiting and not tagging version number" 16 | exit 0 17 | fi 18 | 19 | # use xargs -0 (BSD) or xargs -d '\n' (GNU) to read env vars with spaces 20 | # https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs 21 | export $(grep -v '^#' .env | xargs) 22 | tag=${DOCKER_TAG}-${RSP_VERSION} 23 | 24 | echo "Pushing tag: ${repoName}:${tag}" 25 | 26 | if [ -n "$tag" ]; then 27 | docker tag $IMAGE_NAME ${repoName}:${tag} 28 | docker push ${repoName}:${tag} 29 | fi 30 | -------------------------------------------------------------------------------- /r-session-complete/bionic/hooks/pre_build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "Building DOCKER_TAG=${DOCKER_TAG}" 6 | 7 | apt-get update -qq && apt-get install -y jq 8 | 9 | replace_version() { 10 | sed -i.bak "s/^RSP_VERSION=.*/RSP_VERSION=$1/g" ./.env 11 | } 12 | replace_base_url_s3() { 13 | sed -i.bak "s|^RSP_DOWNLOAD_URL=.*|RSP_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/bionic/amd64|g" ./.env 14 | } 15 | replace_name() { 16 | sed -i.bak "s/^RSP_NAME=.*/RSP_NAME=$1/g" ./.env 17 | } 18 | 19 | # if daily build 20 | # replace version number and download url 21 | if [[ "${DOCKER_TAG}" == *"daily"* ]]; then 22 | echo "--> Running daily" 23 | # get daily version 24 | rawpage=`curl -sL https://dailies.rstudio.com/rstudioserver/pro/bionic/x86_64/` 25 | 26 | # thanks to https://stackoverflow.com/a/44490624/6570011 27 | if [[ "$rawpage" =~ rstudio-workbench-([0-9\.\-]*)-amd64.deb ]]; then 28 | match="${BASH_REMATCH[1]}" 29 | echo "Latest version found: $match" 30 | replace_version $match 31 | replace_base_url_s3 32 | replace_name rstudio-workbench 33 | else 34 | # fail the build 35 | echo "ERROR parsing latest daily version" 36 | exit 1 37 | fi 38 | elif [[ "${DOCKER_TAG}" == *"preview"* ]]; then 39 | echo "--> Running preview" 40 | # get raw downloads.json 41 | rawjson=`curl -sL https://rstudio.com/wp-content/downloads.json` 42 | 43 | # use jq to parse 44 | full_url=`echo -n $rawjson | jq -r '.rstudio.pro.preview.server.installer.bionic.url'` 45 | version=`echo -n $rawjson | jq -r '.rstudio.pro.preview.version'` 46 | 47 | echo "full_url: $full_url" 48 | 49 | # update .env 50 | replace_version $version 51 | replace_base_url_s3 52 | replace_name rstudio-workbench 53 | 54 | else 55 | echo "No version customization necessary" 56 | fi 57 | 58 | echo '--> Showing .env file' 59 | cat .env 60 | -------------------------------------------------------------------------------- /r-session-complete/bionic/test/goss.yaml: -------------------------------------------------------------------------------- 1 | file: 2 | /usr/lib/rstudio-server: 3 | exists: true 4 | /usr/lib/rstudio-server/bin/rsession: 5 | exists: true 6 | 7 | command: 8 | "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/3.7.7/bin/jupyter nbconvert --to notebook --stdin --stdout": 9 | title: jupyter_works 10 | exit-status: 0 11 | -------------------------------------------------------------------------------- /r-session-complete/bionic/test/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install goss 4 | 5 | GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} 6 | GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} 7 | GOSS_VERSION=${GOSS_VERSION:-0.3.8} 8 | GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} 9 | 10 | # default to empty var file (since vars are not necessary) 11 | if [ ! -f "$GOSS_VARS" ]; then 12 | touch $GOSS_VARS 13 | fi 14 | 15 | # install goss to tmp location and make executable 16 | curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ 17 | && chmod +x /tmp/goss \ 18 | && GOSS=/tmp/goss 19 | 20 | GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT 21 | -------------------------------------------------------------------------------- /r-session-complete/centos7/.env: -------------------------------------------------------------------------------- 1 | RSP_VERSION=1.4.1717-3 2 | RSP_DOWNLOAD_URL=https://download2.rstudio.org/server/centos7/x86_64 3 | RSP_NAME=rstudio-workbench-rhel 4 | -------------------------------------------------------------------------------- /r-session-complete/centos7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:7 2 | 3 | LABEL maintainer="RStudio Docker " 4 | 5 | # Set versions and platforms 6 | ARG R_VERSION=4.0.2 7 | ARG MINICONDA_VERSION=py37_4.8.3 8 | ARG PYTHON_VERSION=3.7.7 9 | ARG DRIVERS_VERSION=1.7.0-1 10 | 11 | # Install RStudio Server Pro session components -------------------------------# 12 | 13 | RUN yum update -y && \ 14 | yum install -y \ 15 | libcurl-devel \ 16 | libuser-devel \ 17 | openssl-devel \ 18 | postgresql-libs \ 19 | rrdtool && \ 20 | yum clean all 21 | 22 | ARG RSP_VERSION=1.4.1717-3 23 | ARG RSP_NAME=rstudio-workbench-rhel 24 | ARG RSP_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 25 | RUN curl -O ${RSP_DOWNLOAD_URL}/${RSP_NAME}-${RSP_VERSION}-x86_64.rpm \ 26 | && yum install -y ${RSP_NAME}-${RSP_VERSION}-x86_64.rpm \ 27 | && rm ${RSP_NAME}-${RSP_VERSION}-x86_64.rpm \ 28 | && yum clean all 29 | 30 | EXPOSE 8788/tcp 31 | 32 | # Install additional system packages ------------------------------------------# 33 | 34 | RUN yum update -y && \ 35 | yum install -y \ 36 | wget \ 37 | git \ 38 | libxml2-devel \ 39 | subversion \ 40 | which && \ 41 | yum clean all 42 | 43 | # Install R -------------------------------------------------------------------# 44 | 45 | RUN yum update -y && \ 46 | yum install -y epel-release && \ 47 | yum clean all 48 | 49 | RUN curl -O https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION}-1-1.x86_64.rpm && \ 50 | yum install -y R-${R_VERSION}-1-1.x86_64.rpm && \ 51 | yum clean all && \ 52 | rm -rf R-${R_VERSION}-1-1.x86_64.rpm 53 | 54 | RUN ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R && \ 55 | ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript 56 | 57 | # Install R packages ----------------------------------------------------------# 58 | 59 | RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("devtools", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' && \ 60 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("tidyverse", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' && \ 61 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("shiny", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' && \ 62 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("rmarkdown", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' && \ 63 | /opt/R/${R_VERSION}/bin/R -e 'install.packages("plumber", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' 64 | 65 | # Install Python --------------------------------------------------------------# 66 | 67 | RUN yum update -y && \ 68 | yum install -y bzip2 && \ 69 | yum clean all 70 | 71 | RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh && \ 72 | bash Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -bp /opt/python/${PYTHON_VERSION} && \ 73 | /opt/python/${PYTHON_VERSION}/bin/pip install virtualenv && \ 74 | rm -rf Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh 75 | 76 | ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" 77 | 78 | # Install Python packages -----------------------------------------------------# 79 | 80 | RUN /opt/python/${PYTHON_VERSION}/bin/pip install \ 81 | altair \ 82 | beautifulsoup4 \ 83 | bokeh \ 84 | cloudpickle \ 85 | cython \ 86 | dash \ 87 | dask \ 88 | flask \ 89 | gensim \ 90 | keras \ 91 | matplotlib \ 92 | nltk \ 93 | numpy \ 94 | pandas \ 95 | pillow \ 96 | plotly \ 97 | pyarrow \ 98 | requests \ 99 | scipy \ 100 | scikit-image \ 101 | scikit-learn \ 102 | scrapy \ 103 | seaborn \ 104 | spacy \ 105 | sqlalchemy \ 106 | statsmodels \ 107 | streamlit \ 108 | tensorflow \ 109 | xgboost 110 | 111 | # Install Jupyter Notebook and RSP/RSC Notebook Extensions and Packages -------# 112 | 113 | RUN /opt/python/${PYTHON_VERSION}/bin/pip install \ 114 | jupyter \ 115 | jupyterlab \ 116 | rsp_jupyter \ 117 | rsconnect_jupyter \ 118 | rsconnect_python 119 | 120 | RUN /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter && \ 121 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter && \ 122 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter && \ 123 | /opt/python/${PYTHON_VERSION}/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter && \ 124 | /opt/python/${PYTHON_VERSION}/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter 125 | 126 | # Install VSCode code-server --------------------------------------------------# 127 | 128 | RUN rstudio-server install-vs-code /opt/code-server/ 129 | 130 | # Install RStudio Professional Drivers ----------------------------------------# 131 | 132 | RUN yum update -y && \ 133 | yum install -y unixODBC unixODBC-devel && \ 134 | yum clean all 135 | 136 | RUN curl -O https://drivers.rstudio.org/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm && \ 137 | yum install -y rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm && \ 138 | yum clean all && \ 139 | cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini 140 | 141 | RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")' 142 | 143 | # Locale configuration --------------------------------------------------------# 144 | 145 | RUN localedef -i en_US -f UTF-8 en_US.UTF-8 146 | ENV LANG en_US.UTF-8 147 | ENV LANGUAGE en_US:en 148 | ENV LC_ALL en_US.UTF-8 149 | -------------------------------------------------------------------------------- /r-session-complete/centos7/docker-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: '2.3' 2 | services: 3 | 4 | sut: 5 | image: $IMAGE_NAME 6 | command: /run_tests.sh 7 | entrypoint: [] 8 | environment: 9 | # uses .env by default 10 | - RSP_VERSION 11 | - CODE_SERVER_VERSION 12 | volumes: 13 | - "./test/run_tests.sh:/run_tests.sh" 14 | - "./test/goss.yaml:/tmp/goss.yaml" 15 | -------------------------------------------------------------------------------- /r-session-complete/centos7/hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo '--> Showing .env file' 6 | cat .env 7 | 8 | # use xargs -0 (BSD) or xargs -d '\n' (GNU) to read env vars with spaces 9 | # https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs 10 | export $(grep -v '^#' .env | xargs) 11 | 12 | echo '--> Showing Environment Variables' 13 | echo "RSP_VERSION=${RSP_VERSION}" 14 | echo "RSP_DOWNLOAD_URL=${RSP_DOWNLOAD_URL}" 15 | echo "IMAGE_NAME=${IMAGE_NAME}" 16 | echo "DOCKERFILE_PATH=${DOCKERFILE_PATH}" 17 | 18 | echo "" 19 | echo "SOURCE_BRANCH=${SOURCE_BRANCH}" 20 | echo "SOURCE_COMMIT=${SOURCE_COMMIT}" 21 | echo "COMMIT_MSG=${COMMIT_MSG}" 22 | echo "DOCKER_REPO=${DOCKER_REPO}" 23 | echo "DOCKER_TAG=${DOCKER_TAG}" 24 | 25 | docker build --build-arg RSP_NAME=${RSP_NAME} --build-arg RSP_VERSION=${RSP_VERSION} --build-arg RSP_DOWNLOAD_URL=${RSP_DOWNLOAD_URL} -f $DOCKERFILE_PATH -t $IMAGE_NAME . 26 | -------------------------------------------------------------------------------- /r-session-complete/centos7/hooks/post_push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # adapted from: https://windsock.io/automated-docker-image-builds-with-multiple-tags/ 3 | 4 | set -e 5 | 6 | # Parse image name for repo name 7 | tagStart=$(expr index "$IMAGE_NAME" :) 8 | imageStart=$(expr index "$IMAGE_NAME" /) 9 | 10 | repoName=${IMAGE_NAME:0:tagStart-1} 11 | imageName=${IMAGE_NAME:imageStart:${#IMAGE_NAME}-tagStart-1} 12 | 13 | # Only tag version for "preview" repository, "bionic" and "centos7" images 14 | if [ "${DOCKER_TAG}" != "bionic" ] && [ "${DOCKER_TAG}" != "centos7" ] && [[ "${repoName}" != *"preview"* ]]; then 15 | echo "Non-release build - exiting and not tagging version number" 16 | exit 0 17 | fi 18 | 19 | # use xargs -0 (BSD) or xargs -d '\n' (GNU) to read env vars with spaces 20 | # https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs 21 | export $(grep -v '^#' .env | xargs) 22 | tag=${DOCKER_TAG}-${RSP_VERSION} 23 | 24 | echo "Pushing tag: ${repoName}:${tag}" 25 | 26 | if [ -n "$tag" ]; then 27 | docker tag $IMAGE_NAME ${repoName}:${tag} 28 | docker push ${repoName}:${tag} 29 | fi 30 | -------------------------------------------------------------------------------- /r-session-complete/centos7/hooks/pre_build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "Building DOCKER_TAG=${DOCKER_TAG}" 6 | 7 | apt-get update -qq && apt-get install -y jq 8 | 9 | replace_version() { 10 | sed -i.bak "s/^RSP_VERSION=.*/RSP_VERSION=$1/g" ./.env 11 | } 12 | replace_base_url_s3() { 13 | sed -i.bak "s|^RSP_DOWNLOAD_URL=.*|RSP_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64|g" ./.env 14 | } 15 | replace_name() { 16 | sed -i.bak "s/^RSP_NAME=.*/RSP_NAME=$1/g" ./.env 17 | } 18 | 19 | # if daily build 20 | # replace version number and download url 21 | if [[ "${DOCKER_TAG}" == *"daily"* ]]; then 22 | echo "--> Running daily" 23 | # get daily version 24 | rawpage=`curl -sL https://dailies.rstudio.com/rstudioserver/pro/bionic/x86_64/` 25 | 26 | # thanks to https://stackoverflow.com/a/44490624/6570011 27 | if [[ "$rawpage" =~ rstudio-workbench-([0-9\.\-]*)-amd64.deb ]]; then 28 | match="${BASH_REMATCH[1]}" 29 | echo "Latest version found: $match" 30 | replace_version $match 31 | replace_base_url_s3 32 | replace_name rstudio-workbench-rhel 33 | else 34 | # fail the build 35 | echo "ERROR parsing latest daily version" 36 | exit 1 37 | fi 38 | elif [[ "${DOCKER_TAG}" == *"preview"* ]]; then 39 | echo "--> Running preview" 40 | # get raw downloads.json 41 | rawjson=`curl -sL https://rstudio.com/wp-content/downloads.json` 42 | 43 | # use jq to parse 44 | full_url=`echo -n $rawjson | jq -r '.rstudio.pro.preview.server.installer.bionic.url'` 45 | version=`echo -n $rawjson | jq -r '.rstudio.pro.preview.version'` 46 | 47 | echo "full_url: $full_url" 48 | 49 | # update .env 50 | replace_version $version 51 | replace_base_url_s3 52 | replace_name rstudio-workbench-rhel 53 | 54 | else 55 | echo "No version customization necessary" 56 | fi 57 | 58 | echo '--> Showing .env file' 59 | cat .env 60 | -------------------------------------------------------------------------------- /r-session-complete/centos7/test/goss.yaml: -------------------------------------------------------------------------------- 1 | file: 2 | /usr/lib/rstudio-server: 3 | exists: true 4 | /usr/lib/rstudio-server/bin/rsession: 5 | exists: true 6 | 7 | command: 8 | "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/3.7.7/bin/jupyter nbconvert --to notebook --stdin --stdout": 9 | title: jupyter_works 10 | exit-status: 0 11 | -------------------------------------------------------------------------------- /r-session-complete/centos7/test/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install goss 4 | 5 | GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} 6 | GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} 7 | GOSS_VERSION=${GOSS_VERSION:-0.3.8} 8 | GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} 9 | 10 | # default to empty var file (since vars are not necessary) 11 | if [ ! -f "$GOSS_VARS" ]; then 12 | touch $GOSS_VARS 13 | fi 14 | 15 | # install goss to tmp location and make executable 16 | curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ 17 | && chmod +x /tmp/goss \ 18 | && GOSS=/tmp/goss 19 | 20 | GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT 21 | -------------------------------------------------------------------------------- /scripts/docker-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | cd r-session-complete/${DISTRO} 7 | docker build . -t r-session-complete 8 | docker images 9 | -------------------------------------------------------------------------------- /scripts/docker-tag-and-push.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | docker tag r-session-complete rstudio/r-session-complete:${DISTRO}-${TRAVIS_TAG} 7 | docker images 8 | 9 | echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin 10 | docker push rstudio/r-session-complete:${DISTRO}-${TRAVIS_TAG} 11 | --------------------------------------------------------------------------------