Files
agentx-techsummit-loadtest/Dockerfile
T
2020-09-23 14:46:48 -04:00

25 lines
458 B
Docker

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"