Skip to content

Commit

Permalink
add devcontainer / latest R
Browse files Browse the repository at this point in the history
  • Loading branch information
black-snow committed Jan 11, 2025
1 parent b330240 commit f0208e1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM blacksnowflake/r-base-dev:4.4.2@sha256:cfc683060a3de236d742df688e373d96d415ebb3a7bb756039734ba7b1f27295

# gdal required for terra (raster)
# libudunits2-dev for bdc (units)
RUN apt update \
&& apt install -y --no-install-recommends \
libgdal-dev \
libudunits2-dev \
cmake \
pandoc \
&& :

# install dev dependencies
RUN R -q -e 'install.packages("renv")'

WORKDIR /invertr

COPY . .
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
"name": "R",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerFile": "./Dockerfile",
"context": "..",
"runArgs": [
"--name",
"dev_invertr",
"--init"
],
"customizations": {
"vscode": {
"extensions": [
"REditorSupport.r"
]
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "R -q -e 'install.packages(\"devtools\")'"

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

0 comments on commit f0208e1

Please sign in to comment.