update for tech summit workshop

This commit is contained in:
David
2020-09-23 14:46:48 -04:00
parent a651b9cd73
commit a066ed3bd1
8 changed files with 149 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM golang:1.14-alpine AS builder
WORKDIR /agentx-loadtest-lunchandlearn
COPY . .
WORKDIR /agentx-loadtest-lunchandlearn/cmd/api
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -mod mod
FROM alpine:latest AS release
RUN apk add curl
WORKDIR /go/bin
COPY --from=builder /go/bin .
RUN apk add -U tzdata && \
apk add --update --no-cache ca-certificates
# Run commands as non-root user
RUN adduser -S summit
USER summit
EXPOSE 8080
CMD "./api"