-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
23 lines (17 loc) · 636 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.11-alpine as builder
WORKDIR /go/src/projectborealisgitlab.site/project-borealis/programming/dev-ops/aa-server
COPY . .
ENV GO111MODULE=on
RUN apk add --no-cache git
RUN CGO_ENABLED=0 GOOS=linux go test ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
FROM alpine:latest
RUN \
apk --no-cache add ca-certificates && \
addgroup app && adduser -S -G app app && \
mkdir -p /home/app/data && \
chown -R app:app /home/app/data
WORKDIR /home/app
USER app
COPY --from=builder /go/src/projectborealisgitlab.site/project-borealis/programming/dev-ops/aa-server/aa-server .
CMD ["./aa-server"]