Pushing the image to the registry
After you have add your libraries to the Dockerfile and create the image, you must push the image to the registry.
Upload your image to the target registry. The value of <target_registry> is
the registry endpoint that was used during the installation of IBM® Software
Hub. This must be a private registry and not the
IBM entitled registry, cp.icr.io.
You can upload by using Docker, Podman or Skopeo:
-
For Docker:
docker login -u <username> -p <password> <target_registry> docker tag <new-image-name> <target_registry>/<new-image-name>:<new-image-tag> docker push <target_registry>/<new-image-name>:<new-image-tag> -
For Podman:
podman login -u <username> -p <password> <target_registry> podman tag <new-image-name> <target_registry>/<new-image-name>:<new-image-tag> podman push <target_registry>/<new-image-name>:<new-image-tag> -
For Skopeo, you don't need a separate login command for Skopeo but Skopeo needs to know if you used Docker or Buildah to build the new image. Depending on the build engine, the location for images changes locally.
If the image was built with Docker:skopeo copy –dest-creds <username>:<password> docker-daemon:<new-image-name> docker://<target_registry>/<new-image-name>:<new-image-tag>If the image was built with Buildah:skopeo copy –dest-creds <username>:<password> container-storage:<new-image-name> docker://<target_registry>/<new-image-name>:<new-image-tag>