add Dockerfile

This commit is contained in:
jkev53 2018-11-12 13:48:56 -06:00
parent 0dea37ee70
commit 2236c8174e
1 changed files with 17 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM golang:1.9-alpine as builder
RUN apk add --no-cache git gcc make musl-dev bash
WORKDIR /go/src/github.com/jkev53/grpcurl
COPY . .
RUN make deps install
FROM alpine:latest
RUN apk --no-cache add ca-certificates curl less nano bash bash-doc bash-completion
# Create a group and user
RUN addgroup -S appgroup && adduser -S user -G appgroup
# Tell docker that all future commands should run as the user user
USER user
COPY --from=builder /go/bin/grpcurl /usr/local/bin
WORKDIR /home/user