nuxsmin / docker-syspass

Docker stuff for running sysPass on Docker
GNU General Public License v3.0
39 stars 21 forks source link

ENTRYPOINT/CMD usage in this project is breaking docker's build pipeline altogether #53

Open tellyo-patryk opened 3 years ago

tellyo-patryk commented 3 years ago

I've tried to add a CA to the image today using 2 methods, one was running a container with syspass, using docker cp to copy the CA and then using docker commit to generate a new image. I couldn't do that, because I used /usr/bin/yes as an entrypoint so the app wouldn't do anything while I was making an image out of it. When I commited the image it got rewritten and the new image pointed to /usr/bin/yes instead of /usr/local/sbin/entrypoint.sh. So I just made another image with the entrypoint set to the correct path and it still didn't work.

I also tried doing that with Dockerfile using the FROM statement like every sane image is used. It didn't work as well, because metadata on the image from the Dockerfile is broken. I'd have to repeat ENTRYPOINT/CMD lines for the image to even work and docker's pipeline shouldn't work like that. You ABSOLUTELY shouldn't EVER use CMD to pass an argument to the entrypoint script.

I'll attatch the metadata skew that is breaking the FROM statement. I can also submit a patch to the Dockerfiles, because it is really simple, you just need to put the statement into one ENTRYPOINT line instead of breaking it onto 2 lines and breaking docker's build pipeline.

tellyo-patryk commented 3 years ago

Screenshot_20210420_151239

tellyo-patryk commented 3 years ago

The one on the right is the image from Dockerhub, the left one is what you see after you modify the image with Dockerfile using a FROM statement, because it inherits that section after the last layer that docker built

tellyo-patryk commented 3 years ago

I was wrong, it's a docker problem, official images do it too sometimes, it'd be nice to mention it in documentation for people that need to modify their images. I'm sorry for a harsh reaction, but I wasted a whole day trying to make this run.