-
Notifications
You must be signed in to change notification settings - Fork 45
/
build.sh
executable file
·46 lines (33 loc) · 1.32 KB
/
build.sh
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
45
#!/bin/bash
# run the go-build
./.build
# set gcloud config to point to this project
# where we are hosting our docker images
gcloud config set project dataux-io
# cleanup local docker
docker rm -f gcr.io/dataux-io/dataux:latest
docker rmi -f gcr.io/dataux-io/dataux:latest
# docker rm -f gcr.io/dataux-io/dataux:v0.15.0
# docker rmi -f gcr.io/dataux-io/dataux:v0.15.0
docker rm -f gcr.io/dataux-io/dataux:v0.15.1
docker rmi -f gcr.io/dataux-io/dataux:v0.15.1
# if you get auth issues
#
# rm ~/.docker/config.json
# gcloud docker --authorize-only
docker build -t gcr.io/dataux-io/dataux:v0.15.1 .
gcloud docker -- push gcr.io/dataux-io/dataux:v0.15.1
docker build -t gcr.io/dataux-io/dataux:latest .
gcloud docker -- push gcr.io/dataux-io/dataux:latest
# now lets allow anyone to read these gcr images
# https://cloud.google.com/container-registry/docs/access-control
gsutil defacl ch -u AllUsers:R gs://artifacts.dataux-io.appspot.com
gsutil acl ch -r -u AllUsers:R gs://artifacts.dataux-io.appspot.com
#rm dataux
# docker pull gcr.io/dataux-io/dataux:v0.0.1
# docker run --rm -e "LOGGING=debug" -p 4000:4000 --name dataux gcr.io/dataux-io/dataux:v0.0.1
# docker -D run gcr.io/dataux-io/dataux:v0.0.1
# echo "about to run docker"
# docker run gcr.io/dataux-io/dataux:v0.0.1
# docker rm $(docker ps -a -q)
# docker rmi $(docker images -q)