About my private registry and private repo

hello, i am docker newbie. I have some question

  1. when i make my image private. other people pull and run this image. They can not see my source code, right ?

  2. i want create aws registry for host my image with private repo, then in other server (serverB) i pull and run this image. finally, i delete image in aws registry, in serverB, app stll run (just can not CI/CD) right ?

tks so much

  1. No. An image is just multiple layers of filesystem and metadata. If you include your sourcecode into the image, everyone can read it who has access to the image.
  2. Yes.But make sure you configure the client to not always pull the image. That is the default behavior in Docker so if the image exist locally, Docker will not try to pull it when you use the docker run command or docker compose up.

@rimelek
Sorry for the time zone difference,
That means I won’t be able to put my source code in, just need compile it into filesystems then push it to the registry, and everyone can run the project when pulled. Finally, I deleted the image from the registry and it did not affect running projects (with the condition of configure the client to not always pull the image) right,
tks you