1

we are developing an application for our customer. The customer must not see the code, since we do not offer the source code to them. Our offer only contains the setup, maintenance and running the Application.

So, we have the Source code here in our private Git. We compile it with the dockerfile and make a docker image out of it.

Since we have no remote access to the customer's Container registry, we cannot simply push a new release version to it.

Is there a way to get new release versions into the customer's registry, without copying the release code to the customer? Maybe pre-compiling, then copy the compiled Code to the customer?

Greetings and thanks in advance!

xola
  • 455
  • 1
  • 4
  • 15
  • Remember that your end user can look at the `docker history` of any image they have and `docker run` any command against the image. The general approach you're describing will work fine provided you're working in a compiled language (C++, Java, Go, Rust); a [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/) can help if you want to do the compilation sequence in Docker too. – David Maze May 28 '20 at 09:35
  • Can you please check the mentioned answers and see if it solves the issue – nischay goyal May 31 '20 at 23:41

2 Answers2

1

A docker image can be saved as a tar file using

docker save -o <filename.tar> <image_name>

You can send that file to your customer, and they can load that file as an image using

docker load -i <filename.tar>

Now they can push that image to their private repository.

Yaron Schwimmer
  • 5,327
  • 5
  • 36
  • 59
0

1 approach should be pushing the docker image to your private hosted Docker registry. And then at your Customer's place, you can use a tool like Nexus(Check here) and configure the Proxy Docker repository which will pull the images from your private docker registry. In this fashion, you are not publishing your code but Docker Image to the customer and they can pull it.

For Proxy Repository information, Check here

nischay goyal
  • 3,206
  • 12
  • 23