Skip to content

Instantly share code, notes, and snippets.

@mosluce
Last active March 26, 2018 17:59
Show Gist options
  • Save mosluce/d3e09db478f10a69587c575a150123cf to your computer and use it in GitHub Desktop.
Save mosluce/d3e09db478f10a69587c575a150123cf to your computer and use it in GitHub Desktop.
Go Dockerfile for dokku
# govendor sync 實在是很慢...所以都直接把 vendor/ 包進 git 了 = = y
FROM golang
ENV PORT=8080 #
EXPOSE 8080 # 這行不寫 dokku 怎麼跑都是用 80 去跑
ADD . /go/src/com/myapp # 使用 registry 說明的 /go/src/app 在 build 時候會錯,每次都要額外改這邊挺麻煩的,期望改善
WORKDIR /go/src/com/myapp
RUN go build -o /www main.go
CMD [ "/www" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment