k8s: add frontend dockerfile + skaffold
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
c9f2c89b9c
commit
92eb76c1db
3 changed files with 85 additions and 0 deletions
24
src/frontend/Dockerfile
Normal file
24
src/frontend/Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
FROM golang:1.10-alpine as builder
|
||||
RUN apk add --no-cache ca-certificates git
|
||||
WORKDIR /go/src/frontend
|
||||
COPY . .
|
||||
|
||||
# download known dependencies
|
||||
RUN go get -d github.com/google/uuid \
|
||||
github.com/gorilla/mux \
|
||||
google.golang.org/grpc \
|
||||
google.golang.org/grpc/codes \
|
||||
google.golang.org/grpc/status
|
||||
|
||||
# other dependencies might not have listed above
|
||||
RUN go get -d ./...
|
||||
RUN go build -o /frontend .
|
||||
|
||||
FROM alpine as release
|
||||
RUN apk add --no-cache ca-certificates
|
||||
WORKDIR /frontend
|
||||
COPY --from=builder /frontend /frontend/server
|
||||
COPY ./templates ./templates
|
||||
COPY ./static ./static
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/frontend/server"]
|
Loading…
Add table
Add a link
Reference in a new issue