Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768622
D145.id347.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
846 B
Referenced Files
None
Subscribers
None
D145.id347.diff
View Options
diff --git a/contrib/arc b/contrib/arc
new file mode 100755
--- /dev/null
+++ b/contrib/arc
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+if [ -t 0 ]; then
+ FLAGS=-it
+fi
+
+PRINT_LOG=0
+
+if [ "$1" = "shell" ]; then
+ shift
+ COMMAND=bash
+else
+ mkdir -p ~/.arc
+ COMMAND=arc
+
+ if [ "$1" = "call-conduit" ]; then
+ PRINT_LOG=1
+ INSTANCE=`openssl rand -hex 21`
+ FLAGS="-i -a=stdin --name=$INSTANCE"
+ fi
+fi
+
+if [ -d ~/.arc/ssh ]; then
+ VOLUME_SSH="-v $HOME/.arc/ssh:/root/.ssh"
+else
+ VOLUME_SSH=""
+fi
+
+if [ $PRINT_LOG -eq 0 ]; then
+ docker run $FLAGS --rm -v ~/.arc:/opt/config -v $PWD:/opt/workspace $VOLUME_SSH nasqueron/arcanist $COMMAND $*
+else
+ docker run $FLAGS -v ~/.arc:/opt/config -v $PWD:/opt/workspace $VOLUME_SSH nasqueron/arcanist $COMMAND $* > /dev/null
+ sleep 3
+ docker logs $INSTANCE
+ docker rm $INSTANCE >/dev/null
+fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 09:15 (14 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259909
Default Alt Text
D145.id347.diff (846 B)
Attached To
Mode
D145: `arc` helper script to run a container on the Docker host
Attached
Detach File
Event Timeline
Log In to Comment