-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 744 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
###
FROM golang:alpine as builder
RUN apk add --no-cache git curl
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
WORKDIR /go/src/SLALite
COPY . .
RUN rm -rf vendor
RUN dep ensure
ARG VERSION
ARG DATE
RUN CGO_ENABLED=0 GOOS=linux go build -a -o SLALite -ldflags="-X main.version=${VERSION} -X main.date=${DATE}" .
###
FROM alpine:3.6
WORKDIR /opt/slalite
COPY --from=builder /go/src/SLALite/SLALite .
RUN mkdir /etc/slalite
COPY docker/slalite_prometheus.yml /etc/slalite/slalite.yml
RUN addgroup -S slalite && adduser -D -G slalite slalite
RUN chown -R slalite:slalite /etc/slalite && chmod 700 /etc/slalite
EXPOSE 8090
#ENTRYPOINT ["./run_slalite.sh"]
USER slalite
ENTRYPOINT ["/opt/slalite/SLALite"]