How to Use This Guide
5%
Heredoc
In this guide, we will make extensive use of heredoc to create files. Heredoc is a way to create multi-line strings in Bash. It's a redirection method that allows you to pass multiple lines of input to a command. Here is an example:
cat <file.txt
Passwords are like underwear:
- You shouldn’t leave them out where people can see them.
- You should change them regularly.
- You shouldn’t loan them out to strangers.
EOF
<> operator redirects the output to a file. As a result, when you copy and paste the whole block into your terminal, it will create a file named file.txt with the content:
Passwords are like underwear:
- You shouldn’t leave them out where people can see them.
- You should change them regularly.
- You shouldn’tPainless Docker - 2nd Edition
A Comprehensive Guide to Mastering Docker and its EcosystemEnroll now to unlock all content and receive all future updates for free.
Unlock now  $31.99$25.59Learn More
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
