iT邦幫忙

3

Docker Debug 挑戰題 - 網頁跑板了!? 小容器 我要進來囉

https://ithelp.ithome.com.tw/upload/images/20210628/201009516jlLVAZj64.jpg

這邊為一道設計過的 Docker Debug 挑戰題目,初始環境有所設置錯誤,請大家幫忙找出 Dockerfile 哪邊寫錯了?

情境敘述:這禮拜你進到新公司,主管丟給你一個 Dockerfile 共用基底模板,但你發現與你實際的專案有所出入,需要做調整才能使用,這時候就需要你來自行解決問題,歡迎有興趣的人來挑戰看看!

3分鐘快速建立挑戰環境:

  1. 下載專案
    git clone https://github.com/uopsdod/docker-debug-initial.git
  2. 下載圖片
    https://github.com/uopsdod/docker-debug-initial-image/blob/main/docker_debug_cover.jpeg
  3. 建立 dokcer image
    docker build -t mywebsite --no-cache .
  4. 啟動 docker container
    docker run -d -p 81:80 --name mywebsite mywebsite
  5. 查看首頁畫面
    若使用 toolbox 安裝方式,則使用 docker-machine ip default 找出 ip 位置 (ex. 192.168.64.8:81)
    http://localhost:81/

你將會看到以下的初始畫面:
https://ithelp.ithome.com.tw/upload/images/20210628/20100951yni7k8353I.png

請透過修改 Dockerfile,讓最終畫面呈現如下:
https://ithelp.ithome.com.tw/upload/images/20210628/201009519stJfeoe2f.png

挑戰唯一規則:

僅能修改 Dockerfile

具體要求項目與難度分數:

30% 「Docker Debug Challenge」排版置中
10% 「Page Not Fully Loaded」警示字詞變成「Excellent! Page Fully Loaded」
10% 按鈕敘述:「Solve It Now」轉變成「Solved」
40% 呈現背景圖片
10% 按鈕敘述:ACHIEVED BY [放上自己名字]

提示:查看首頁 html source code
提示:善用 docker exec

歡迎完成挑戰的人截圖自己的成功畫面,並在下面留言展示一番!

若需完整解答,私訊「用圖片高效學程式」臉書專頁拿取:
https://www.facebook.com/105673814305452


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
4
Miles
iT邦新手 2 級 ‧ 2021-07-08 10:02:27

蠻有趣的,已完成

https://ithelp.ithome.com.tw/upload/images/20210708/20102562atPx1IEBKf.jpg

讚!全部都達成!

1
雷N
iT邦研究生 1 級 ‧ 2021-07-08 11:12:32

https://ithelp.ithome.com.tw/upload/images/20210708/201049306hmkAdQg3G.jpg

完成 好玩

1
akari0624
iT邦新手 5 級 ‧ 2021-07-10 22:56:35

https://ithelp.ithome.com.tw/upload/images/20210710/20103915TE0j5ZgChf.jpg

酷,好玩,共襄盛舉。

1
p50815
iT邦新手 5 級 ‧ 2021-07-10 23:08:56

完成!!

https://ithelp.ithome.com.tw/upload/images/20210710/20119415nLlb9jsZ7d.png

我要留言

立即登入留言