[afterCode] docker 速成班 番外篇: 隨機容器名

上一篇 blog 提到使用 docker 啓動一個容器若是沒有使用--name來指定容器名字的話,docker 會自動按照 形容詞_名人名的形式生成一個.linux

那這些名人是誰呢?git

源代碼說明一切 /pkg/namesgenerator/names-generator.go#L105程序員

// Docker, starting from 0.7.x, generates names from notable scientists and hackers.
// Please, for any amazing man that you add to the list, consider adding an equally amazing woman to it, and vice versa.github

自 0.7.x docker 用一些著名的科學家和黑客名字來命名容器. 若是有你認爲有尚未在這些列表中的話,給 docker 項目提交. 哈哈,想給牛逼項目提交 pr 嗎? 又多了一個路子.docker

如今這個模塊裏面一共有160個名字,其中也有一些女性的科學家. 經過 grep 搜了下 female 只有6個. 因此剛纔的註釋也鼓勵你提交一些牛逼的女性科學家或者黑客.ide

每一個名人名字前面都會有1句很簡單的介紹,而後帶上對應的 wiki 的連接. 先翻譯幾個你們耳熟能詳的幾個名字吧.翻譯

// Nikola Tesla invented the AC electric system and every gadget ever used by a James Bond villain. https://en.wikipedia.org/wiki/
// 特斯拉: 發明了交流電和全部007反派使用的
"tesla",

// Ken Thompson - co-creator of UNIX and the C programming language - https://en.wikipedia.org/wiki/Ken_Thompson
// 湯普森:  unix 和 C 的聯合創始人.(筆者注: 堪稱程序員的祖師爺)
"thompson",

// Linus Torvalds invented Linux and Git. https://en.wikipedia.org/wiki/Linus_Torvalds
// 林納斯: geek 之神 發明了 linux 和 git
"torvalds",

// Alan Turing was a founding father of computer science. https://en.wikipedia.org/wiki/Alan_Turing.
// 圖靈: 計算機科學之父. (14年的電影: [模仿遊戲](https://movie.douban.com/subject/10463953/) 很是值得一看)
"turing",

固然除了人名以外還有93個超有意思的形容詞,背好這幾個單詞讚賞別人的時候就不怕詞窮;固然罵別人也同樣不怕沒詞. : punix

但願你們喜歡.code

相關文章
相關標籤/搜索