Skip to content

Commit

Permalink
Get basic devcontainer setup working (#2459)
Browse files Browse the repository at this point in the history
* Fix typo (devcontainers->devcontainer)

* basic git extension

* add requirements to Dockerfile

* multi-line string instead

* exclude standard packages

* fix typo in Rbuildignore too

* patrick too

* Use remotes to encapsulate installation

* simplify

* combine 2nd+3rd install calls

* even simpler

* drop remotes

* syntax

* one more, spacing for clarity

* Try COPY from parent directory

* copy to '.'

* try symlinking

* no longer need COPY

* or maybe I do?

* i suck at symlink

* i hate docker so much

* hard-code deps

* revert

* trying build.context instead

* git :(

* Back to remotes

* semicolon needed

* Comment about '|>' + '_' (#2495)

* rm obsolete

* don't include Depends (just a distraction)

* formatting

* revert

---------

Co-authored-by: AshesITR <[email protected]>
  • Loading branch information
MichaelChirico and AshesITR authored Dec 23, 2023
1 parent f76eb76 commit 2a240d8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
^\.Rproj\.user$
^\.idea$
^\.dev$
^\.devcontainers$
^\.devcontainer$
^\.lintr$
^\.lintr_new$
^wercker\.yml$
Expand Down
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM rocker/r-base

RUN apt-get -qq update && \
apt-get install -y --no-install-recommends git libxml2-dev

COPY DESCRIPTION .

RUN Rscript -e ' \
install.packages("remotes"); \
remotes::install_deps(dependencies = c( \
"Imports", \
"Config/needs/development" \
)) \
'
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"build": { "dockerfile": "Dockerfile", "context": ".."}
}
3 changes: 0 additions & 3 deletions .devcontainers/devcontainers.json

This file was deleted.

1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Enhances:
VignetteBuilder:
knitr
Config/Needs/website: tidyverse/tidytemplate
Config/Needs/development: pkgload, cli, testthat, patrick
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down

0 comments on commit 2a240d8

Please sign in to comment.