forked from GoogleCloudPlatform/podcast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (35 loc) · 804 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Makefile for building and running the GCP Podcast
#
#--- Host Targets ---
TAG=gcr.io/gcppodcast/dev
NAME=gcppodcast-dev
# build the docker image
build:
docker build --tag=$(TAG) dev
clean:
docker rmi $(TAG)
push:
gcloud docker -- push $(TAG)
pull:
gcloud docker -- pull $(TAG)
shell:
mkdir -p ~/.config/gcloud
docker run --rm \
--name=$(NAME) \
-p=1313:1313 \
-p=22 \
-p=8080 \
-e TERM \
-e HOST_GID=`id -g` \
-e HOST_UID=`id -u` \
-e HOST_USER=$(USER) \
-v ~/.config/gcloud:/home/$(USER)/.config/gcloud \
-v ~/.appcfg_oauth2_tokens:/home/$(USER)/.appcfg_oauth2_tokens \
-v "`pwd`/dev/zshrc":/home/$(USER)/.zshrc \
-v "`pwd`":/project \
-it $(TAG) /root/startup.sh
attach:
docker exec -it --user=$(USER) $(NAME) zsh
attach-root:
docker exec -t $(NAME) bash