1

I am using Fedora Linux. I am trying to run a docker image and this error came up. Can someone help on how to fix it? (Resetting my bashrc file didn't help nor did other quick fixes suggested here).

bash -version
GNU bash, version 5.1.16(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

This gives no output:

$ exec "$@"
Prad
  • 47
  • 8
  • 2
    Are you getting this message from something running inside the container? If so, does the container include bash, or is it based on something like Alpine that doesn't include bash? – Gordon Davisson Feb 20 '23 at 06:29
  • @GordonDavisson Thanks. It solved the issue but now I have another error :( exec /app/scripts/something.sh: no such file or directory (It's there) – Prad Feb 20 '23 at 11:54

1 Answers1

3

Try running it through #!/usr/bin/bash instead of #!/usr/bin/env bash. You can see the differences here.

M B
  • 2,700
  • 2
  • 15
  • 20
  • Thanks. It solved the issue but now I have another error :( exec /app/scripts/something.sh: no such file or directory (It's there) – Prad Feb 20 '23 at 11:54
  • The issue with situations like this is usually something small that goes unnoticed. Exec into the container, check that the file is there and has executable permissions, then execute it from within the container and see if it works. – M B Feb 20 '23 at 12:30