mirror of
https://github.com/docker/buildx.git
synced 2024-11-22 15:37:16 +08:00
hack: make tmux optional for shell
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
252ab3e103
commit
5b5dafde0d
@ -1,8 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmux new -s demo -d
|
||||
tmux new-window 'dockerd -s overlay2 -D'
|
||||
tmux new-window
|
||||
tmux a -t demo
|
||||
dockerdCmd="dockerd -s overlay2 -D"
|
||||
|
||||
if [ -n "$TMUX_ENTRYPOINT" ]; then
|
||||
tmux new -s demo -d
|
||||
tmux new-window "$dockerdCmd"
|
||||
tmux new-window
|
||||
tmux a -t demo
|
||||
else
|
||||
( $dockerdCmd 2>/var/log/dockerd.log & )
|
||||
exec sh
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2,11 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
: ${TMUX=}
|
||||
|
||||
function clean {
|
||||
docker rmi $(cat $iidfile)
|
||||
}
|
||||
|
||||
iidfile=$(mktemp -t docker-iidfile.XXXXXXXXXX)
|
||||
docker build --iidfile $iidfile --target demo-env .
|
||||
DOCKER_BUILDKIT=1 docker build --iidfile $iidfile --target demo-env .
|
||||
trap clean EXIT
|
||||
docker run -it --privileged --rm $(cat $iidfile)
|
||||
docker run -it --privileged --rm -e TMUX_ENTRYPOINT=$TMUX $(cat $iidfile)
|
Loading…
Reference in New Issue
Block a user