Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created April 6, 2020 18:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahoward/1d950df74df9d5eeacf3c939e348cf0e to your computer and use it in GitHub Desktop.
Save ahoward/1d950df74df9d5eeacf3c939e348cf0e to your computer and use it in GitHub Desktop.
fixes "# mesg: ttyname failed: Inappropriate ioctl for device" warnings during docker build
# fixes "# mesg: ttyname failed: Inappropriate ioctl for device" warnings when building docker
#
echo '#! /bin/sh' > /usr/bin/mesg
chmod 755 /usr/bin/mesg
# all this does is replace the 'mesg' command with a no-op that always succeeds.
# do this *early* in your Dockerfile somewhere.
# from a security persprective this is also fine because it relates to multi-user unix systems,
# not single user/contrained docker images.
@klofton
Copy link

klofton commented May 7, 2022

this is what Ive been looking for! Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment