#!/usr/bin/env -S bash -c "podman run --rm -w /x -v "\$PWD:/x" \$(podman build -q - < \$0) \${@:1}" FROM python:3-slim RUN python3 -m pip --no-cache-dir install yt-dlp ENTRYPOINT [ "yt-dlp" ] It is a valid Dockerfile, but if I run it, it will build an image using podman containing the fork of youtube-dl that I want to use (yt-dlp), and then run that image, with the args I supplied. #!/usr/bin/env bash podman build -q -t "localhost/youtube-dl" - <<EOF &>/dev/null FROM python:3-slim RUN python3 -m pip --no-cache-dir install yt-dlp ENTRYPOINT ["yt-dlp"] EOF podman run --rm -w /x -v " $PWD :/x" -w /x "localhost/youtube-dl" " $@ "