local-php-security-checker
local-php-security-checker copied to clipboard
Docker
Added dockerfile
Maybe it's better to use FROM scratch
instead of alpine image.
While a scratch image is great, a version with a shell would be useful for GitLab's runner which blows up without a shell.
Example of Google Kaniko adding an image with a shell to solve this. https://gitlab.com/gitlab-org/gitlab-foss/-/issues/45512
In my opinion, docker image should be as small as possible. If someone wants to use it in another project (like GitLab's runner), they can always create their own multi-step image with app from official image.
Let's create simple things, not complex just because someone maybe need it in the future :smiley:
So yeah, its possible to make it that small. It doesn't match my needs as well as some of the people discussing in #8 who are already trying to use this in gitlab pipelines. From my needs it feels be like only making a arm build because that's the smallest possible.
If having the main image created from scratch
is a hard requirement for getting this accepted that's fine. I was offering Google's approach as a solution to make this as useful. TL;DNR, they have a scratch image that works for their pipelines but also a :dev
tag with busybox so you can create a container with a shell for debugging but it also supports gitlab pipelines.
Updated build image to Go v15 and base image - scratch with certificates.
HI! Why MR not merge ?
Tested this - works great!
Got a project using Drupal 7.40 to test:
![___www_local-php-security-checker-docker__o_o_](https://user-images.githubusercontent.com/378794/166084594-296f86db-519e-46ba-ab2d-8ea1689b31c0.png)