continuous integration of docker image by running locally with its own IP?

9/12/2016

I am trying out google container engine or kubernetes and have deployed a simple mean stack on it. I am doing following below steps in my local machine to deploy new changes.

docker push commands takes a lot of time (and my network speeds are not great)

docker build --no-cache -t gcr.io/$PROJECT_ID/my-app:v7 .
# below command takes a lot of time to push
gcloud docker push gcr.io/$PROJECT_ID/my-app:v7
kubectl set image deployment/my-app-pod my-app-pod=gcr.io/$PROJECT_ID/my-app:v7

Question is in two parts:

  1. How can I optimise continuous integration here - especially docker push command taking an hour ?

  2. How can I run docker image with its own IP on my local machine - as I am doing small changes and testing a behaviour(session,cookies) which is only reproducible with an external-ip and not on http://localhost. Answer to this will help first part of question.

-- npr
continuous-integration
docker
kubernetes

1 Answer

9/13/2016

For the second part:

Just start using something like minkube - which is like a local development version of Kubernetes.

You can then deploy your app easily to an actual local Kubernetes instance, and then once satisfied, you can push to gcloud.

-- manojlds
Source: StackOverflow