Skip to content

Instantly share code, notes, and snippets.

View haitch's full-sized avatar

Haitao Chen haitch

  • Microsoft
  • Redmond
View GitHub Profile
@haitch
haitch / Dockerfile
Last active November 18, 2017 00:57
Multi-Stage build for golang and react project
# 1. using golang image to build server side code (echo.labstack.com)
FROM golang:1.8 as goBuilder
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/goApp
# optimization for caching layers
COPY ["Gopkg.toml", "Gopkg.lock", "./"]
RUN dep ensure --vendor-only
# coping source file and compile
COPY ["*.go", "./"]
RUN go install