summary refs log tree commit diff
path: root/bin/compose
diff options
context:
space:
mode:
Diffstat (limited to 'bin/compose')
-rwxr-xr-xbin/compose10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/compose b/bin/compose
new file mode 100755
index 0000000..e4a5dbd
--- /dev/null
+++ b/bin/compose
@@ -0,0 +1,10 @@
+#!/bin/sh
+cwd="$PWD"
+container_cwd="/run/cwd/$(basename "$cwd")"
+exec docker run \
+    --rm -it \
+    --net host \
+    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
+    --mount type=bind,src="$cwd",dst="$container_cwd" \
+    -w "$container_cwd" \
+    docker/compose:latest $@