build-push-containers.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. # Copyright 2015 The Kubernetes Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #K8PetStore version is tied to the redis version. We will add more info to version tag later.
  16. #Change the 'jayunit100' string below to you're own dockerhub name and run this script.
  17. #It will build all the containers for this application and publish them to your dockerhub account
  18. version="r.2.8.19"
  19. docker build -t jayunit100/k8-petstore-redis:$version ./redis/
  20. docker build -t jayunit100/k8-petstore-redis-master:$version ./redis-master
  21. docker build -t jayunit100/k8-petstore-redis-slave:$version ./redis-slave
  22. docker build -t jayunit100/k8-petstore-web-server:$version ./web-server
  23. docker push jayunit100/k8-petstore-redis:$version
  24. docker push jayunit100/k8-petstore-redis-master:$version
  25. docker push jayunit100/k8-petstore-redis-slave:$version
  26. docker push jayunit100/k8-petstore-web-server:$version
  27. ### Now, start the application.