In the Best practices for writing Dockerfiles guide of the docker documentation, we can read:

Avoid installing or using sudo since it has unpredictable TTY and signal-forwarding behavior that can cause problems. If you absolutely need functionality similar to sudo, such as initializing the daemon as root but running it as non-root), consider using “gosu”.

My questions are:

  • What exactly in the sudo behavior is unpredictable?
  • Which problems can it cause?
  • Is it a feature or a bug of sudo?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.