Docker Tag, Containers and Kubernetes Pods: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:


Dockerfile:
Dockerfile:
FROM busybox
<syntaxhighlight lang='docker'>
CMD echo "I am blue"
FROM busybox
CMD echo "I am blue"
</syntaxhighlight>


  docker build -t docker.io/ovidiufeodorov/color:latest .
  docker build -t docker.io/ovidiufeodorov/color:latest .
  docker push ovidiufeodorov/color
  docker push ovidiufeodorov/color

Revision as of 20:46, 12 August 2019

Internal

Overview

Containers executed by Docker behave differently in respect to tag resolution than the same containers executed from a Kubernetes pod.

We create a "color:latest" container that serves "blue" and push it on Docker Hub.

Dockerfile:

FROM busybox
CMD echo "I am blue"
docker build -t docker.io/ovidiufeodorov/color:latest .
docker push ovidiufeodorov/color