Skip to content

Commit

Permalink
devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed Apr 8, 2024
1 parent e73060f commit 6a44df5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"runArgs": [
"-v", "/etc/timezone:/etc/timezone:ro",
"-v", "/etc/localtime:/etc/localtime:ro"
],
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
Expand All @@ -20,5 +24,9 @@
}
}
},
"onCreateCommand": "bash .devcontainer/onCreate.sh"
"onCreateCommand": "bash .devcontainer/onCreate.sh",
"postCreateCommand": "bash .devcontainer/postCreate.sh",
"mounts": [
"source=${localEnv:MY_DEVCONTAINERS_SECRETS_DIR},target=/home/vscode/secrets,type=bind,ro,consistency=cached"
]
}
8 changes: 4 additions & 4 deletions .devcontainer/onCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mkdir -p ~/.oh-my-zsh/completions
echo "autoload -U compinit" >> ~/.zshrc
echo "compinit -i" >> ~/.zshrc

# Directory to store Rfam data (set in LocalPreferences.toml)
mkdir -p ~/data/Rfam

# Install Julia packages, registries, ...
/home/vscode/.juliaup/bin/julia .devcontainer/onCreate.jl
/home/vscode/.juliaup/bin/julia .devcontainer/onCreate.jl

# Fix permissions for Julia Base, stdlibs (see https://github.com/JuliaLang/juliaup/issues/865, https://github.com/JuliaLang/julia/pull/51150/files)
find /home/vscode/.julia/juliaup/*/share/julia/{base,stdlib} -type f -name '*.jl' -exec chmod 444 {} \;
3 changes: 3 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Authenticate GitHub CLI
gh auth login -h github.com --with-token < /home/vscode/secrets/gh_token_classic.txt
#gh auth setup-git

0 comments on commit 6a44df5

Please sign in to comment.