Skip to content

Commit 3751269

Browse files
committed
docs(docker): updated docker docs
1 parent 6e006f7 commit 3751269

File tree

13 files changed

+29
-391
lines changed

13 files changed

+29
-391
lines changed

Makefile

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,6 @@ proto proto-%:
107107
fi
108108
@rsync -a github.com/xmlking/micro-starter-kit/service/account/proto/ service/account/proto && rm -Rf github.com
109109

110-
proto2 proto2-%:
111-
@if [ -z $(TARGET) ]; then \
112-
for d in $(TYPES); do \
113-
for f in $$d/**/proto/**/*.proto; do \
114-
protoc --proto_path=.:${GOPATH}/src \
115-
--go_out=paths=source_relative:. \
116-
--validate_out=lang=go,paths=source_relative:. $$f; \
117-
echo ✓ compiled: $$f; \
118-
done \
119-
done \
120-
else \
121-
for f in ${TYPE}/${TARGET}/proto/**/*.proto; do \
122-
protoc --proto_path=.:${GOPATH}/src \
123-
--go_out=plugins=grpc,paths=source_relative:. \
124-
--validate_out=lang=go,paths=source_relative:. $$f; \
125-
echo ✓ compiled: $$f; \
126-
done \
127-
fi
128-
129110
proto_shared:
130111
@for f in ./shared/proto/**/*.proto; do \
131112
protoc --proto_path=.:${GOPATH}/src \
@@ -308,13 +289,13 @@ docker_push:
308289
docker push $$image; \
309290
done;
310291

311-
kustomize: OVERLAY := e2e
292+
kustomize: OVERLAY := local
312293
kustomize: NS := default
313294
kustomize:
314-
# @kustomize build deploy/overlays/${OVERLAY}/ | sed -e "s|\$$(NS)|${NS}|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" | kubectl apply -f -
315-
@kustomize build deploy/overlays/${OVERLAY}/ | sed -e "s|\$$(NS)|${NS}|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/deploy.yaml
295+
# @kustomize build --load_restrictor none config/envs/${OVERLAY}/ | sed -e "s|\$$(NS)|${NS}|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" | kubectl apply -f -
296+
@kustomize build --load_restrictor none config/envs/${OVERLAY}/ | sed -e "s|\$$(NS)|${NS}|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/kubernetes.yaml
316297

317298
build/kustomize: check_dirty
318-
@kustomize build deploy/overlays/e2e/ | sed -e "s|\$$(NS)|default|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/deploy.e2e.yaml
319-
@kustomize build deploy/overlays/production/ | sed -e "s|\$$(NS)|default|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/deploy.production.yaml
320-
@kustomize build deploy/overlays/production/ | sed -e "s|\$$(NS)|mynamespace|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/deploy.production.mynamespace.yaml
299+
@kustomize build --load_restrictor none config/envs/local | sed -e "s|\$$(NS)|default|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/kubernetes.local.yaml
300+
@kustomize build --load_restrictor none config/envs/production/ | sed -e "s|\$$(NS)|default|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/kubernetes.production.yaml
301+
@kustomize build --load_restrictor none config/envs/production/ | sed -e "s|\$$(NS)|mynamespace|g" -e "s|\$$(IMAGE_VERSION)|${VERSION}|g" > build/kubernetes.production.mynamespace.yaml

config/envs/local/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ images:
5959
newTag: v0.10.1
6060
- name: postgres
6161
newTag: 11.5-alpine
62+
- name: envoyproxy/envoy-alpine
63+
newName: docker.io/envoyproxy/envoy-alpine
64+
newTag: v1.14.1
6265
- name: micro/micro
6366
newName: docker.pkg.github.com/xmlking/micro-starter-kit/micro
6467
newTag: v2.0.0

docs/devops/docker.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,18 @@ kubectl run --rm mygateway --image=micro/micro:latest \
9494
--restart=Never -it \
9595
--command ./micro api
9696
```
97+
98+
## Cleanup
99+
100+
[Removing Docker Containers and Images](https://dbaontap.com/2017/04/16/removing-docker-containers-images/)
101+
102+
```bash
103+
docker images
104+
# Remove Docker Containers
105+
docker rmi <image id>
106+
# Stop & Remove All Docker Containers
107+
docker stop $(docker ps -a -q)
108+
docker rm $(docker ps -a -q)
109+
make docker_clean
110+
```
111+

docs/introduction/makefile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ make release VERSION=v0.1.1 GITHUB_TOKEN=123...
122122

123123
### docker
124124

125+
Optionally set `export DOCKER_BUILDKIT=1` to use `moby`
126+
125127
```bash
126128
make docker-account VERSION=v0.1.1
127129
make docker-account-service VERSION=v0.1.1

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.26.0
99
// replace github.com/xmlking/configor => /Users/schintha/Developer/Work/go/configor
1010

1111
require (
12+
github.com/DATA-DOG/go-sqlmock v1.4.1 // indirect
1213
github.com/envoyproxy/protoc-gen-validate v0.1.0
1314
github.com/gogo/protobuf v1.3.1
1415
github.com/golang/protobuf v1.4.2

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L
2727
github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88=
2828
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2929
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
30+
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
3031
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
3132
github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8=
3233
github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks=

scripts/kustomize.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "Deploying micro-starter-kit..."
99

1010
# Set the image tag to the sha hash that we just built in the previous stage.
1111
# K8S will do a rolling deployment
12-
( cd deploy/overlays/production; \
12+
( cd config/envs/production; \
1313
kustomize edit set docker.pkg.github.com/xmlking/micro-starter-kit/greeter-service:"$SHORT_SHA" && \
1414
kustomize edit set namespace $NS && \
1515
kustomize build | \

service/pure/client/main.go

Lines changed: 0 additions & 34 deletions
This file was deleted.

service/pure/handler/pure.handler.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

service/pure/main.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)