Skip to content

Commit 8ccc8eb

Browse files
committed
moving the dockerfile to a shell script
1 parent c3a4fe9 commit 8ccc8eb

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "RSXML Python",
33
"image": "mcr.microsoft.com/devcontainers/python:3.12",
44
"features": {
5+
"ghcr.io/devcontainers/features/node": {
6+
"version": 22
7+
},
58
"ghcr.io/devcontainers/features/common-utils:2": {
69
"installZsh": "true",
710
"configureZshAsDefaultShell": "true",
@@ -19,5 +22,5 @@
1922
]
2023
}
2124
},
22-
"postCreateCommand": "pip install uv && uv pip install --system -e .[dev]"
25+
"postCreateCommand": "bash .devcontainer/post-create.sh"
2326
}

.devcontainer/post-create.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Install wget
5+
sudo apt-get update
6+
sudo apt-get install -y wget
7+
8+
# Install Yarn
9+
sudo npm install -g yarn
10+
sudo corepack enable
11+
12+
# Configure Yarn and Zsh in user home
13+
(
14+
cd ~
15+
yarn set version berry
16+
mkdir -p ~/.oh-my-zsh/custom/themes
17+
wget https://raw.githubusercontent.com/Riverscapes/environment/master/nar-ys.zsh-theme -O ~/.oh-my-zsh/custom/themes/nar-ys.zsh-theme
18+
wget https://raw.githubusercontent.com/Riverscapes/environment/master/.aliases -O ~/.aliases
19+
wget https://raw.githubusercontent.com/Riverscapes/environment/master/.zshrc -O ~/.zshrc
20+
)
21+
22+
# Install Python dependencies
23+
pip install uv
24+
uv pip install --system -e .[dev]

0 commit comments

Comments
 (0)