Commit 0131ee3 Joshua M. Dotson
committed
1 parent 02b9a01 commit 0131ee3 Copy full SHA for 0131ee3
File tree 5 files changed +29
-17
lines changed
5 files changed +29
-17
lines changed Original file line number Diff line number Diff line change 1
- export AWS_PROFILE=myprofile
2
1
export PROJECT=$( basename " ${PWD} " )
3
2
4
- export DOCKER_REGISTRY=" myregistry.amazonaws.com" "
5
- export DOCKER_NAMESPACE=" arch"
6
-
7
- export DOCKER_REPOSITORY=" ${DOCKER_REGISTRY} /${DOCKER_NAMESPACE} /${PROJECT} "
3
+ export DOCKER_REPOSITORY=ciscosso/mh
8
4
export DOCKER_TAG=$( grep ' versionNumber = ' cmd/root.go | cut -d\" -f2)
9
5
10
6
export DOCKER_IMAGE=" ${DOCKER_REPOSITORY} :${DOCKER_TAG} "
11
-
12
- eval ` aws ecr get-login --no-include-email`
Original file line number Diff line number Diff line change 1
- FROM golang:latest
1
+ FROM golang:latest AS golang
2
2
WORKDIR /go/src/github.com/cisco-sso/mh
3
3
RUN go get -u github.com/golang/dep/cmd/dep
4
4
COPY . .
5
5
RUN dep ensure \
6
6
&& CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o mh .
7
7
8
- FROM alpine:latest
9
- RUN apk --no-cache add ca-certificates
8
+ FROM dtzar/helm-kubectl:2.8.0
10
9
WORKDIR /root/
11
- COPY --from=0 /go/src/github.com/cisco-sso/mh/mh .
10
+ COPY --from=golang /go/src/github.com/cisco-sso/mh/mh .
12
11
ENTRYPOINT ["./mh" ]
Original file line number Diff line number Diff line change 2
2
dockerBuild : Dockerfile
3
3
docker build -t ${DOCKER_IMAGE} .
4
4
5
+ # # We use Docker Hub's Automated Build, so this target isn't commonly used.
5
6
.PHONY : dockerPush
6
7
dockerPush : dockerBuild
7
8
docker push ${DOCKER_IMAGE}
8
9
9
10
.PHONY : dockerTest
10
11
dockerTest :
11
12
docker run -it --rm ${DOCKER_IMAGE}
12
-
13
- .PHONY : awsEcrCreateRepo
14
- awsEcrCreateRepo :
15
- aws ecr create-repository --repository-name ${DOCKER_NAMESPACE} /${PROJECT}
16
-
Original file line number Diff line number Diff line change @@ -147,6 +147,29 @@ mh destroy wordpress
147
147
mh status foo --json 2>&1 | jq --slurp
148
148
```
149
149
150
+ ## Docker
151
+
152
+ ```
153
+ docker run --rm \
154
+ -v $(pwd):/platform-deploy \
155
+ -v ~/.kube:/.kube \
156
+ -v ~/.helm:/root/.helm \
157
+ -e KUBECONFIG=/.kube/mycluster.example.org \
158
+ -e MH_CONFIG=/platform-deploy/clusters/mycluster.example.org/mh/main.yaml \
159
+ ciscosso/mh simulate
160
+ ```
161
+
162
+ ** NOTE:** The MH apps and config in this example exist in the platform-deploy tree.
163
+
164
+ Apps should be stored relative to MH config. (use ` configPath ` instead of ` path ` ).
165
+
166
+ ```
167
+ appSources:
168
+ - name: apps
169
+ kind: configPath
170
+ source: ../../../apps
171
+ ```
172
+
150
173
## Contributing
151
174
152
175
For information on contributing to this repo, please see the accompanying ` CONTRIBUTING.md ` file.
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func Execute() {
59
59
}
60
60
61
61
func init () {
62
- versionNumber = "v0.5.0 "
62
+ versionNumber = "v0.5.1 "
63
63
64
64
cobra .OnInitialize (initConfig )
65
65
You can’t perform that action at this time.
0 commit comments