4 ms·
Cute trick, but it's not actually what the title claims. Since this is actually env calling bash first, not docker, this should just be a Bash script. You can
by throwaway892238 3y ago
Cute trick, but it's not actually what the title claims.
Since this is actually env calling bash first, not docker, this should just be a Bash script. You can still feed the Dockerfile to docker build via STDIN. But you'd gain the ability to shellcheck the Bash, the code would be easier to read, write, maintain, add comments to, etc. You could keep the filename the same, run it the same way, etc. The way they've done it here is just unnecessarily difficult.
- chii 3y ago> You can still feed the Dockerfile to docker build via STDIN. but you'd then have to work out how to "filter out" the bash commands inside this bash script to make it a valid docker file. Unless of course, you entirely store the docker file contents inside heredocs. That works fine, but it's not as "cool" as "executing" dockerfiles as a script.
- notso411 3y agoYou can say it is wrong without being insufferably condescending