docker-alpine: GNU Screen seems to be broken
I was trying to fix https://github.com/chamunks/alpine-rtorrent image when I bumped into the issue which is that GNU screen on Alpine Linux image is not usable in a TTY mode (daemon mode works, but there is a little point in that if you cannot really see the terminal).
Here is a minimal Dockerfile to reproduce the issue:
FROM alpine
RUN apk add --no-cache screen
Here is how I run it:
$ docker build -t alpine-screen-issue .
$ docker run -it --rm alpine-screen-issue sh
# screen
Here is the error I get:
Cannot access '/3': No such file or directory
(/3 varies from machine to machine, so it is some sort of a descriptor.)
Here is strace log:
access("/root/.nethackrc", F_OK) = -1 ENOENT (No such file or directory)
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
readv(3, [{"", 0}, {"root:x:0:0:root:/root:/bin/ash\nb"..., 1024}], 2) = 1024
lseek(3, -993, SEEK_CUR) = 31
close(3) = 0
open("/etc/tcb/root/shadow", O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
readv(3, [{"", 0}, {"root:::0:::::\nbin:!::0:::::\ndaem"..., 1024}], 2) = 454
lseek(3, -440, SEEK_CUR) = 14
close(3) = 0
ioctl(0, TIOCGWINSZ, {ws_row=46, ws_col=213, ws_xpixel=0, ws_ypixel=0}) = 0
readlink("/proc/self/fd/0", "/3", 32) = 2
stat("/3", 0x7fff15e703c8) = -1 ENOENT (No such file or directory)
ioctl(1, TIOCGWINSZ, {ws_row=46, ws_col=213, ws_xpixel=0, ws_ypixel=0}) = 0
writev(1, [{"Cannot access '/3': No such file"..., 45}, {"\r\n", 2}], 2Cannot access '/3': No such file or directory
) = 47
I don’t have Alpine Linux bare-metal installation at the moment, so I am not sure whether the bug is in upstream or it is related only to Docker.
P.S. screen on Ubuntu image works just fine, as well as tmux on Alpine Linux image.
/cc @ncopa
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (6 by maintainers)
@frol if you read docker/docker#8755, you’ll see that you can hack around this by using the
scriptcommand.check https://github.com/docker/docker/issues/8755