Add exercise_1.4.txt
This commit is contained in:
parent
c464039e98
commit
d59652ca67
1 changed files with 24 additions and 0 deletions
24
part1/exercise_1.4.txt
Normal file
24
part1/exercise_1.4.txt
Normal file
|
@ -0,0 +1,24 @@
|
|||
[devops@devops part1]$ docker run --name curl -it ubuntu sh -c 'while true; do echo "Input website:"; read website; echo "Searching.."; sleep 1; curl http://$website; done'
|
||||
Input website:
|
||||
helsinki.fi
|
||||
Searching..
|
||||
sh: 1: curl: not found
|
||||
|
||||
Open another terminal:
|
||||
[devops@devops part1]$ docker exec -it curl bash
|
||||
root@6774b835507a:/# apt install curl
|
||||
-> Failed due to missing package db
|
||||
root@6774b835507a:/# apt update
|
||||
root@6774b835507a:/# apt install curl
|
||||
root@6774b835507a:/# exit
|
||||
|
||||
Back in original terminal:
|
||||
Input website: helsinki.fi
|
||||
Searching..
|
||||
<html>
|
||||
<head><title>301 Moved Permanently</title></head>
|
||||
<body>
|
||||
<center><h1>301 Moved Permanently</h1></center>
|
||||
<hr><center>nginx/1.20.1</center>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue