forked from vicanso/diving
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 847 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 847 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 node:10-alpine as webbuilder
RUN apk update \
&& apk add git \
&& git clone --depth=1 https://github.com/vicanso/diving.git /diving \
&& cd /diving/web \
&& npm i \
&& npm run build \
&& rm -rf node_module
FROM golang:1.11.1-alpine as builder
COPY --from=webbuilder /diving /diving
RUN apk update \
&& apk add docker git gcc make \
&& go get -u github.com/gobuffalo/packr/v2/packr2 \
&& cd /diving \
&& make build
FROM alpine
EXPOSE 7001
COPY --from=builder /usr/lib/libltdl.so.7.3.1 /usr/lib/
COPY --from=builder /usr/bin/docker /usr/bin/docker
COPY --from=builder /diving/diving /usr/local/bin/diving
RUN ln -s /usr/lib/libltdl.so.7.3.1 /usr/lib/libltdl.so.7 \
&& ln -s /usr/lib/libltdl.so.7.3.1 /usr/lib/libltdl.so
CMD ["diving"]
HEALTHCHECK --interval=10s --timeout=3s \
CMD diving --mode=check || exit 1