AutoPacker-OSS / autopacker

MIT License
6 stars 1 forks source link

Docker image names published to the central repository aren't unique #84

Closed libanbn closed 3 years ago

libanbn commented 3 years ago

The Docker image name is generated though the name of the user and the name of the given module. A user can have multiple modules with the same name, as long as they are separated into their respective projects. That means that the final docker image when a user has multiple modules named the same, regardless of what project the module is in, will be conflicting.

Here is an example of a user that has two projects, both containing two modules each:

user/ ├─ project-1/ │ ├─ api-module/ │ ├─ php-module/ ├─ project-2/ │ ├─ api-module/ │ ├─ vuejs-module/

Both project has modules named the same, api-module.

The Docker image names for project 1 becomes: user/api-module user/php-module

The Docker image names for project 2 becomes: user/api-module user/vuejs-module

Once these are pushed to Docker Hub, they will update on the same image name despite the contents of both api-modules having different content.

You might want to start with these files: https://github.com/AutoPacker-OSS/autopacker/blob/develop/file-delivery-api/src/main/java/no/autopacker/filedeliveryapi/service/BuilderService.java

https://github.com/AutoPacker-OSS/autopacker/blob/develop/file-delivery-api/src/main/java/no/autopacker/filedeliveryapi/service/DockerService.java