From 6a061366d48ab76562c7503f99144cf8e5dbf602 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 19 May 2020 21:56:22 +0200 Subject: bin: Add enter and compose helpers for working *in* docker containers --- bin/hibiki/compose | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/hibiki/compose (limited to 'bin/hibiki/compose') 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 $@ -- cgit 1.4.1