Skip to content

Commit 4190806

Browse files
Update script
1 parent d9bb114 commit 4190806

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

doc/source/development/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ with a full pandas development environment.
163163

164164
There is a script to help you with this::
165165

166-
./docker.sh
166+
./scripts/docker.sh
167167

168168
When prompted, enter your Github username.
169169

scripts/docker.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
#
3+
# Set up a development environment with Docker.
4+
5+
run_container () {
6+
# Run a container and bind the local forked repo to it
7+
docker run -it --rm -v "$(pwd)":/home/pandas-"$USER" pandas-"$USER"-env
8+
}
9+
10+
# Check if pandas image already exists
11+
docker image ls | grep "pandas-$USER-env" &> /dev/null
12+
13+
if [[ $? == 0 ]]; then
14+
15+
run_container
16+
17+
else
18+
19+
# Pass the Github username as the build variable
20+
read -rp "Github username: " gh_username
21+
docker build --tag pandas-"$USER"-env --build-arg gh_username=$gh_username .
22+
23+
run_container
24+
25+
fi

0 commit comments

Comments
 (0)