Jason Lee
  • Home
  • Github
Subscribe
gcp

Docker 連接 Google Container Registry

Jason Lee

Apr 18, 2019 • 1 min read
  1. 安裝 gcloud sdk
  2. 登入 gcloud
  3. 執行 gcloud auth configure-docker

Reference:
https://cloud.google.com/container-registry/docs/advanced-authentication?hl=zh-tw

Sign up for more like this.

Enter your email
Subscribe

Golang Guideline

1. Accept interfaces, return structs https://dev.to/lcaparelli/should-my-methods-return-structs-or-interfaces-in-go-3b7 2. Try to avoid using pointer https://blog.maxkit.com.tw/2015/08/null-null-reference-is-billion-dollar.html 2

Jason Lee Jul 4, 2021 • 1 min read

Go Module with private github repository

今天用 go mod download 想下載新專案的依賴的時候一直遇到一個錯誤 go: github.com/your-repo/[email protected]: reading github.com/your-repo/your-kit/go.mod at revision v0.1.0: unknown revision v0.1.0 這是因為我們有使用到一些私有repo 上面的 library,然後我們沒有給權限,所以在使用 go mod download 無法成功抓取,就出現這樣的訊息了。這邊需要做下面這個流程就可以成功了 因為 go mod 其實底層是呼叫 git 的指令來做事情,所以我們必須給 git 有

Jason Lee Jun 11, 2021 • 2 min read

docker network host mode is not available for docker windows and mac

I try to create a local development enviornment using docker-compose. I was planning to allow a docker service to expose a port to host machine and therefore the machine can access the service. Unfortunately, it seems to me that it doesn't work on windows and mac os. reference: https://stackoverflow.

Jason Lee Aug 29, 2020 • 1 min read
Jason Lee © 2023
Powered by Ghost