字串小豬

StringPiggy

Latest stories

在 Mac 上從 docker 容器內連到本機(localhost)

最近開始在用 docker ,但我實在是太笨了,所以把撞牆的筆記記下來免得再撞一次。

情境:因為要寫 e2e 的測試,而原本的環境都在 docker 裡面。只有要測試的網頁因為我還在修改,不想要改一點就 build image,所以先放在 localhost,所以想要從 docker 的 container 裡面連到 localhost 的網頁。

Google 關鍵字:accessing localhost inside docker container
Docker 版本:Docker version 17.09.0-ce, build afdb6d4

看了許多搜尋結果後得到兩個簡單的結論:

  1. 以要存取 localhost:8000 為例子,如果不是用 Chrome 瀏覽器存取,就直接用

    use docker.for.mac.localhost:8000 to connect to localhost:8000
  2. 如果是要用 Chrome 的話,則要連到 192.168.65.1:8000

參考資料:

  1. Cannot connect to docker.for.mac.localhost · Issue #511 · SeleniumHQ/docker-selenium
  2. From inside of a Docker container, how do I connect to the localhost of the machine? – Stack Overflow

Installing vue-cli with Yarn

FYI, I’m only starting out too, this post just delivers the topic “Installing vue-cli with Yarn”, and it’s not working out of the box as of 2016-11-02. See issue. It will be fixed very soon.

No comparisons, no introductions, and other bullshit involved.

Just checking out vue.js and saw that it provides a cli tool to scaffold projects, Just wondering, why not just use yo generator? And I found this issue, saying

The main reason is that vue-cli makes it easier to just fork one of the official templates and create your own tailored template. […]

The other factor is branding. vue init just feels better than yo vue 😉

So for the sake of feeling better… I guess?

(繼續閱讀…)

VoiceTube,有緣再相會

bye-voicetube-title-picture

前情提要傳送門
面試 >>VoiceTube 實習生面試準備小心得 – 人生實習初體驗!
心得 >>在 VoiceTube 實習的日子:誰說認真工作就不能顧興趣!

直到昨天才真正離開 VoiceTube~
很開心當初決定要來這裡實習
我不是個感性的人
打不出會讓人熱淚盈框的故事
頂多就是講講垃圾話
致 VoiceTube 陪我的這段日子
感謝 VT 讓我死纏爛打這麼久
(繼續閱讀…)

分類

標籤雲