- Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdockerfile.sh
More file actions
Latest commit
executable file
·19 lines (15 loc) · 494 Bytes
/
Copy pathdockerfile.sh
File metadata and controls
executable file
·19 lines (15 loc) · 494 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
if [ -e .env ];then
source .env
fi
:${RI_VERSION?"need to set ruby-install version RI_VERSION, see README.md"}
:${ROOT=/root}
:${IMAGE=ubuntu:precise}
:${RI_PATH=ruby-install-$RI_VERSION}
:${RI_URL=https://codeload.github.com/postmodern/ruby-install/tar.gz/v$RI_VERSION}
:${OPTIONS="-i -t -w $ROOT -v $(pwd):$ROOT -e HOME=$ROOT -e ROOT=$ROOT"}
:${CMD=$ROOT/install.sh}
if [ !-d$RI_PATH ];then
curl $RI_URL| tar -xzvf -
fi
docker run $OPTIONS$IMAGE$CMD