summary refs log tree commit diff
path: root/bin/hibiki/compose
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-05-19 21:56:22 +0200
committerRobert Günzler <r@gnzler.io>2020-05-19 21:56:22 +0200
commit6a061366d48ab76562c7503f99144cf8e5dbf602 (patch)
tree16496c5900b145f31e08d7e8aeb59e666d3ce818 /bin/hibiki/compose
parent7bce1399fd663dbaa164262cc5d1634c03d8d97d (diff)
bin: Add enter and compose
helpers for working *in* docker containers
Diffstat (limited to 'bin/hibiki/compose')
-rwxr-xr-xbin/hibiki/compose10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/hibiki/compose b/bin/hibiki/compose
new file mode 100755
index 0000000..e4a5dbd
--- /dev/null
+++ b/bin/hibiki/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 $@