add docker-compose +more

This commit is contained in:
Neale Pickett 2017-09-11 03:33:19 +00:00
parent e172d5e008
commit 1d4c5b0e7d
1 changed files with 38 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# Stuff to make Cloud OS / Container Linux # Stuff to make Cloud OS / Container Linux
# less type-tastic # less type-tastic
d () { dh () {
docker run \ docker run \
-e TERM \ -e TERM \
-e HOME \ -e HOME \
@ -21,6 +21,7 @@ irssi () {
fi fi
docker attach irssi docker attach irssi
echo
} }
alias dev_appserver.py="_dev_appserver" alias dev_appserver.py="_dev_appserver"
@ -30,21 +31,48 @@ _dev_appserver () {
--rm \ --rm \
-p 8080:8080 \ -p 8080:8080 \
-p 8000:8000 \ -p 8000:8000 \
-v $appdir:/app \ -v $appdir:/app:ro \
google/cloud-sdk \ google/cloud-sdk \
dev_appserver.py --host=0.0.0.0 --admin_host=0.0.0.0 /app "$@" dev_appserver.py --host=0.0.0.0 --admin_host=0.0.0.0 /app "$@"
} }
dbtl () { dbtl () {
d --rm -it dbtl "$@" dh \
--rm \
-it \
-w "$(pwd)" \
dbtl "$@"
} }
backup () { backup () {
d --rm google/cloud-sdk gsutil -m rsync \ dh \
-r \ --rm \
-d \ google/cloud-sdk gsutil \
-x tmp \ -m rsync \
-x src \ -r \
$HOME \ -d \
gs://neale-private/fozzie -x tmp \
-x src \
-x go \
$HOME \
gs://neale-private/fozzie
echo
} }
go () {
dh \
--rm \
-e GOPATH=$HOME/go \
-w "$(pwd)" \
golang:1.6 go "$@"
}
docker-compose () {
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):$(pwd) \
--rm \
--workdir $(pwd) \
docker/compose:1.16.1 "$@"
}