-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from behrica/newDevContainer
fixes #107
- Loading branch information
Showing
4 changed files
with
67 additions
and
22 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 |
---|---|---|
@@ -1,5 +1,25 @@ | ||
FROM mcr.microsoft.com/devcontainers/java:11-bullseye | ||
FROM clojure:temurin-21-tools-deps-1.11.3.1456-jammy | ||
|
||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Create the user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
# | ||
# [Optional] Add sudo support. Omit if you don't need to install software after connecting. | ||
&& apt-get update \ | ||
&& apt-get install -y sudo \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# ******************************************************** | ||
# * Anything else you want to do like clean up goes here * | ||
# ******************************************************** | ||
|
||
# [Optional] Set the default user. Omit if you want to keep the default as root. | ||
USER $USERNAME | ||
SHELL ["/bin/bash", "-ec"] | ||
ENTRYPOINT ["bash"] | ||
|
||
RUN bash -c "bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)" | ||
RUN bash -c "bash < <(curl -s https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/master/install)" | ||
RUN apt-get update && apt-get install -y rlwrap gfortran libblas-dev liblapack-dev libpng-dev libfontconfig1-dev libfreetype-dev gfortran libicu-dev cmake |
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 |
---|---|---|
@@ -1,31 +1,48 @@ | ||
{ | ||
"name": "my Clojure app", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
}, | ||
|
||
|
||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/clojure-asdf:2": {}, | ||
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {} | ||
|
||
"features": { | ||
|
||
}, | ||
"forwardPorts": ["12345","7777"], | ||
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { | ||
"packages": "rlwrap,r-base-dev" | ||
}, | ||
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}, | ||
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {}, | ||
"ghcr.io/rocker-org/devcontainer-features/rstudio-server": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": { | ||
"packages": "nloptr,Rserve,ranger,randomForest,ggthemes,ggplot2,mice,dplyr", | ||
"additionalRepositories": "rforge= 'https://rforge.net'", | ||
"installSystemRequirements": true | ||
}, | ||
"ghcr.io/wxw-matt/devcontainer-features/command_runner:latest": { | ||
"command1": "bash < <(curl -s https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/master/install)", | ||
"command2": "bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)", | ||
"command3": "bash -c 'wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /usr/local/bin/lein && chmod +x /usr/local/bin/lein'" | ||
} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rocker-org/devcontainer-features/r-apt", | ||
"ghcr.io/devcontainers-contrib/features/apt-get-packages", | ||
"ghcr.io/rocker-org/devcontainer-features/r-packages" | ||
], | ||
"forwardPorts": [12345], | ||
"portsAttributes": { | ||
"12345": { | ||
"label": "nrepl" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
}, | ||
"extensions": | ||
[ | ||
"vscjava.vscode-java-pack", | ||
"borkdude.clj-kondo", | ||
"extensions": [ | ||
"betterthantomorrow.calva" | ||
] | ||
} | ||
}, | ||
|
||
"remoteUser": "vscode", | ||
"onCreateCommand": "Rscript -e 'pak::pkg_install(c(\"ranger\",\"randomForest\",\"ggthemes\",\"ggplot2\",\"mice\",\"dplyr\",\"url::https://rforge.net/Rserve/snapshot/Rserve_1.8-12.tar.gz\"))'" | ||
"postAttachCommand": | ||
{ "prepare": ["bash","-c", "-i", "source ./.devcontainer/setup.sh"] | ||
} | ||
} |
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,3 @@ | ||
#!/bin/bash -xe | ||
|
||
clj -Sthreads 1 -P |
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