Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install-packages: use gosu / sudo automatically #1108

Open
abitrolly opened this issue Jun 30, 2023 · 0 comments
Open

install-packages: use gosu / sudo automatically #1108

abitrolly opened this issue Jun 30, 2023 · 0 comments

Comments

@abitrolly
Copy link

Is your feature request related to a problem? Please describe

I'm always frustrated when I have to use sudo in Dockerfile because hadolint complains about it - https://github.com/hadolint/hadolint/wiki/DL3004

Describe the behaviour you'd like

install-packages to use sudo or gosu automatically to install the package.

Additional context

This Dockerfile can not be built.

FROM gitpod/workspace-full:2023-05-08-21-16-55
RUN install-packages yamllint
 => ERROR [2/2] RUN install-packages yamllint                                                                                               0.6s
------
 > [2/2] RUN install-packages yamllint:
#0 0.585 Run this script again as root to install packages.

This Dockerfile is invalid by hadolint.

FROM gitpod/workspace-full:2023-05-08-21-16-55
RUN sudo install-packages yamllint
.gitpod.Dockerfile:2 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root                  ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant