Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[CSO] How create and push docker images to docker registry



Article ID: KB36446 KB Last Updated: 02 Feb 2021Version: 1.0

This article shows how to create a new docker image and push it to docker registry for use in a Contrail Service Orchestration (CSO) environment.



For creating and pushing a new docker image, perform the following steps:

Note: As an example, we are creating a docker image for the "tssm-core" microservice in the CSO environment.

  1. Check for available docker images for the "tssm-core" microservice.

root@ip-100-127-250-63:/tmp/Site_upgrade_20200722:vpn1_SLUJ10$ docker images | grep tssm-core 
csp-registry:10000/csp-docker/tssm-core-svr                         db3ba3f32f6a        6 weeks ago         904MB 
  1. Create a new docker image for "tssm-core." 

  2. Check the container ID for the currently running docker process for the "tssm-core" microservice.

root@ip-100-127-250-63:/tmp/Site_upgrade_20200722:vpn1_SLUJ10$ docker ps | grep tssm-core 

a7f768c55ce8        ec293ff0da10                                                          "/csp-service-docker…"   24 hours ago        Up 24 hours                             k8s_tssm-core_csp.csp-tssm-core-6db6c7b8b5-m6fk2_central_95d4ced8-ccb9-11ea-8d30-026857dd8016_0 

ef9b600e93f1   "/pause"                 24 hours ago        Up 24 hours                             k8s_POD_csp.csp-tssm-core-6db6c7b8b5-m6fk2_central_95d4ced8-ccb9-11ea-8d30-026857dd8016_0 
  1. Use the container ID for tssm-core (a7f768c55ce8) that is obtained from Step 3 to create a new docker image with tag Commit and create a new tag for docker ID (tssm-core) as shown below and push it to the docker registry (csp-registry:10000/csp-docker/tssm-core-svr).

root@ip-100-127-250-211:/tmp/Site_upgrade_20200929:vpn1_3P3MO0$ docker commit a7f768c55ce8 csp-registry:10000/csp-docker/tssm-core-svr: 


root@ip-100-127-250-211:/tmp/Site_upgrade_20200929:vpn1_3P3MO0$ docker tag csp-registry:10000/csp-docker/tssm-core-svr: csp-registry:10000/csp-docker/tssm-core-svr: 

root@ip-100-127-250-211:/tmp/Site_upgrade_20200929:vpn1_3P3MO0$ docker push csp-registry:10000/csp-docker/tssm-core-svr: 

The push refers to repository [csp-registry:10000/csp-docker/tssm-core-svr].

fcc67c5282e3: Pushed 
3309ff800566: Layer already exists 
9d96cb0ee132: Layer already exists 
93b1a277586f: Layer already exists 
ba4eba13e4e6: Layer already exists 
9b31ac959f41: Layer already exists 
024b42f7e119: Layer already exists 
0f43b625b2ed: Layer already exists 
3778c0e5a98a: Layer already exists 
632e57e7900e: Layer already exists 
53312af383ba: Layer already exists 
64e91a665f84: Layer already exists 
9bb25113ec30: Layer already exists 
2ed4fd94ff3b: Layer already exists 
013049d8e185: Layer already exists 
79e52152d426: Layer already exists 
ef8aef9f0242: Layer already exists 
3dd7a1088d8f: Layer already exists 
00eadfaf83b1: Layer already exists 
ede0d2763310: Layer already exists 
5553f8c74bd9: Layer already exists 
7d60a84ded91: Layer already exists 
d5d8a49daf30: Layer already exists 
d7f16b1b9023: Layer already exists 
bb5160db7a98: Layer already exists 
c0cc70b202ed: Layer already exists 
b9f9f8852288: Layer already exists 
428c1ba11354: Layer already exists 
b097f5edab7b: Layer already exists 
27712caf4371: Layer already exists 
8241afc74c6f: Layer already exists digest: sha256:0a6a9a6bccf08234dbdb97ff85a7a3b255a9a629390ed4a73ab5838ced519779 size: 6815 
  1. Verify the image created as shown below: 

root@ip-100-127-250-211:/tmp/Site_upgrade_20200929:vpn1_3P3MO0$ docker images | grep tssm-core 

csp-registry:10000/csp-docker/tssm-core-svr                       5b503c42e415        About a minute ago   905MB
csp-registry:10000/csp-docker/tssm-core-svr                          ea8b0dd8a59a        10 days ago          904MB 


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search