Skip to content

Commit 528d341

Browse files
committed
moving the dockerfile to a shell script
1 parent c3a4fe9 commit 528d341

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-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+
npm install -g yarn
10+
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]

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# .pre-commit-config.yaml
2+
#
3+
# This file configures pre-commit hooks for the project.
4+
# Pre-commit hooks are scripts that run automatically before each commit
5+
# to ensure code quality and consistency.
6+
#
7+
# To use these hooks:
8+
# 1. Install pre-commit: pip install pre-commit
9+
# 2. Install the git hooks: pre-commit install
10+
# 3. (Optional) Run against all files: pre-commit run --all-files
11+
#
12+
# For more information, see https://pre-commit.com/
13+
114
repos:
215
- repo: https://github.com/pre-commit/pre-commit-hooks
316
rev: v4.5.0

0 commit comments

Comments
 (0)