FLINK-37881: Drop gosu in favour of Dockerfile USER#225
FLINK-37881: Drop gosu in favour of Dockerfile USER#225avi-sanwal wants to merge 1 commit intoapache:masterfrom
Conversation
5deee8e to
78ac6bb
Compare
78ac6bb to
c62c16e
Compare
|
In general I agree to remove I think this PR must go into the |
Thanks for your time reviewing this change. I will do this via I have already done this in our own base image with a modified copy of the entrypoint script and it has been running successfully in production for a few months now. We use flink kubernetes operator managing the deployments. |
Ping me on the other PR and this can be closed.
I think we should mention these steps somewhere to help others but the approach is fine as soon as the changes are manageable. |
|
@gaborgsomogyi , please see #242 for dev-master changes. |
This is a minor improvement from security standpoint on flink's docker image.
In the dockerfile of flink's docker image, we are adding gosu:
flink-docker/1.20/scala_2.12-java17-ubuntu/Dockerfile
Lines 27 to 44 in 6e22650
This is later used to switch to the user flink in the entrypoint script:
flink-docker/1.20/scala_2.12-java17-ubuntu/docker-entrypoint.sh
Line 37 in 6e22650
Gosu itself is tagged by popular scanners as being vulnerable due to outdated golang usage (though gosu itself is not).
Instead of using gosu/su-exec, it may be preferrable to switch to flink user using USER flink or something similar in Dockerfile. This way we could avoid depending on gosu, and present a cleaner scan result.
While this does not really solve any vulnerabilties in the system, it can help satisfy auditors against false positive reports provided by heuristical scanners.