Skip to content

Commit 49dcc4e

Browse files
committed
add new build aids
1 parent fa29289 commit 49dcc4e

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# https://github.com/golang/go/issues/13470
4+
# https://github.com/GoogleCloudPlatform/google-cloud-go/issues/229
5+
# https://github.com/tamird/cockroach/commit/9c93044ce7d3283e78f5941b8b9bcd836f80a7ef
6+
# +LDFLAGS += -extldflags "-static-libgcc -static-libstdc++"
7+
# GOOS=linux go build -a --ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo .
8+
9+
# wtf, this should fix above? but didn't?
10+
# GOOS=linux go build -a --ldflags '-extldflags "-static-libgcc -static-libstdc++"' -tags netgo -installsuffix netgo .
11+
12+
GOOS=linux GOARCH=amd64 go build
13+

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM scratch
2+
MAINTAINER Aaron Raddon <[email protected]>
3+
4+
ADD dataux /dataux
5+
ENTRYPOINT ["/dataux"]

build.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
./.build
3+
4+
5+
# cleanup local docker
6+
# docker rm -f gcr.io/dataux-io/dataux:v0.0.1
7+
# docker rmi -f gcr.io/dataux-io/dataux:v0.0.1
8+
9+
# if you get auth issues
10+
#
11+
# rm ~/.docker/config.json
12+
# gcloud docker --authorize-only
13+
14+
echo "" > temp.txt
15+
16+
17+
docker build -t gcr.io/dataux-io/dataux:v0.0.1 .
18+
gcloud docker -- push gcr.io/dataux-io/dataux:v0.0.1
19+
20+
# now lets allow anyone to read these gcr images
21+
# https://cloud.google.com/container-registry/docs/access-control
22+
#gsutil defacl ch -u AllUsers:R gs://artifacts.dataux-io.appspot.com
23+
#gsutil acl ch -r -u AllUsers:R gs://artifacts.dataux-io.appspot.com
24+
#rm dataux
25+
26+
# docker pull gcr.io/dataux-io/dataux:v0.0.1
27+
# docker run --rm -e "LOGGING=debug" -p 4000:4000 --name dataux gcr.io/dataux-io/dataux:v0.0.1
28+
# docker -D run gcr.io/dataux-io/dataux:v0.0.1
29+
30+
echo "about to run docker"
31+
docker run gcr.io/dataux-io/dataux:v0.0.1
32+
33+
# docker rm $(docker ps -a -q)
34+
# docker rmi $(docker images -q)
35+

0 commit comments

Comments
 (0)