From d59652ca67e6cb7d569858e399f04245414dd8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Mon, 13 Mar 2023 13:26:07 +0200 Subject: [PATCH] Add exercise_1.4.txt --- part1/exercise_1.4.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 part1/exercise_1.4.txt diff --git a/part1/exercise_1.4.txt b/part1/exercise_1.4.txt new file mode 100644 index 0000000..3b3a469 --- /dev/null +++ b/part1/exercise_1.4.txt @@ -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.. + +301 Moved Permanently + +

301 Moved Permanently

+
nginx/1.20.1
+ +