What is | bash -

What exactly does | bash -the end of the first line of this code in the Docker file do?

Why -at the end?

RUN curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
RUN yum install -y tar nodejs
+4
source share
1 answer

| bashmeans to output the output from the curl command, i.e. the loaded bash script, as command input bash. -does bash read the script from stdin instead of the file.

In other words, the command loads the script and executes it with bash.

+4
source

Source: https://habr.com/ru/post/1660586/


All Articles