Sorry, I was using the wrong base docker image in that last test. Here's an strace from 'rocker/r-base:4.1.2' + 'apt-get update && apt-get install strace':
execve("/usr/local/bin/test_executable.sh", ["test_executable.sh"], 0x7ffd6cca52a0 /* 7 vars */) = 0 brk(NULL) = 0x56414d32f000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18355, ...}) = 0 mmap(NULL, 18355, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f38da0b7000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\177\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1839168, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f38da0b5000 mmap(NULL, 1852480, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f38d9ef0000 mprotect(0x7f38d9f16000, 1658880, PROT_NONE) = 0 mmap(0x7f38d9f16000, 1347584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f38d9f16000 mmap(0x7f38da05f000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16f000) = 0x7f38da05f000 mmap(0x7f38da0ab000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7f38da0ab000 mmap(0x7f38da0b1000, 13376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f38da0b1000 close(3) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f38d9eee000 arch_prctl(ARCH_SET_FS, 0x7f38da0b65c0) = 0 mprotect(0x7f38da0ab000, 12288, PROT_READ) = 0 mprotect(0x56414b34f000, 8192, PROT_READ) = 0 mprotect(0x7f38da0e6000, 4096, PROT_READ) = 0 munmap(0x7f38da0b7000, 18355) = 0 getuid() = 0 --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- getgid() = 0 getpid() = 8 rt_sigaction(SIGCHLD, {sa_handler=0x56414b344a20, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f38d9f2cef0}, NULL, 8) = 0 geteuid() = 0 brk(NULL) = 0x56414d32f000 brk(0x56414d350000) = 0x56414d350000 getppid() = 1 getcwd("/", 4096) = 2 openat(AT_FDCWD, "/usr/local/bin/test_executable.sh", O_RDONLY) = 3 fcntl(3, F_DUPFD, 10) = 10 close(3) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 geteuid() = 0 getegid() = 0 rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGINT, {sa_handler=0x56414b344a20, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f38d9f2cef0}, NULL, 8) = 0 rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f38d9f2cef0}, NULL, 8) = 0 rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f38d9f2cef0}, NULL, 8) = 0 read(10, "#!/bin/sh\nif test -x /usr/bin/he"..., 8192) = 103 faccessat(AT_FDCWD, "/usr/bin/head", X_OK) = 0 write(1, "/usr/bin/head is executable\n", 28/usr/bin/head is executable ) = 28 read(10, "", 8192) = 0 exit_group(0) = ? +++ exited with 0 +++