Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aditya R <arajan@redhat.com>
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM docker.io/library/python:latest | ||
|
||
RUN <<EOF | ||
echo "print first line from heredoc" | ||
echo "print second line from heredoc" | ||
EOF | ||
|
||
RUN <<EOF | ||
echo "Heredoc writing first file" >> /file1 | ||
echo "some text of first file" >> /file1 | ||
EOF | ||
|
||
RUN cat file1 | ||
|
||
RUN python3 <<EOF | ||
with open("/file2", "w") as f: | ||
print("file2 from python", file=f) | ||
EOF | ||
|
||
RUN cat file2 | ||
|
||
ADD <<EOF /index.html | ||
(your index page goes here) | ||
EOF | ||
|
||
RUN cat index.html | ||
|
||
COPY <<robots.txt <<humans.txt /test/ | ||
(robots content) | ||
robots.txt | ||
(humans content) | ||
humans.txt | ||
|
||
RUN cat /test/robots.txt | ||
RUN cat /test/humans.txt |