I am using docker for mac 18.05.0-ce-mac66 (24545) (edge) with Kubernetes support and i am struggling with creating a kubernetes deployment referencing locally built image. You are absolutely right. My idea was to use 'latest' tag ONLY for local development with Kubernetes on Docker Edge. The development workflow would be: 1.
The name of the configuration. Connect to Docker daemon with. Docker for Mac. For macOS only: If you are using Docker for macOS, this is the recommended connection option. The basic idea is that the command line that you invoke is exactly the command line that the docker daemon sees so only paths exported from the Docker for.
Modify application code. Run docker build ( so to create image always with tag being latest) 3. Run kubectl apply -f deployment.yaml. This way i would NOT need a new tag each time i change sth in my app and (what's worse) reference that 'new tag' in my deployment.yaml. That was the whole idea to streamline my development workflow – Jun 9 '18 at 15:40. In addition to comment and answer, I would like to provide some examples of how to do it. General rule.
You have to use tag version of images rather than latest. With Docker tags, the more specific you can get, the better. Get specific to avoid using the wrong image. Consider this if you don't want your colleagues or other Docker users pulling down images and having no idea how recent they are. Get specific to avoid such issues.
Docker tag IMAGE ID image/TAG:version.d.m.y For better management of your images, you should have some smart convention of naming. I prefer to use a stage, version, and date of creation of the image. For example: docker tag 113a43faa138 ubuntu/prod:v1.8.6.2018 It means production stage, version 1, created on 8 June 2018. And that's all. Your version is available, and naming is easier to understand for you and further users of this image.