File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1
2+ FROM gcr.io/cadvisor/cadvisor:v0.46.0 as libpfm_donor
3+
4+ FROM alpine:3.17.0 as build
5+
6+ WORKDIR /build
7+
8+ COPY . ./
9+
10+ # "openssl-libs-static" fixes "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the"
11+ RUN apk add autoconf-archive automake bash bison boost-dev cmake coreutils \
12+ curl ccache git gcc gdb g++ libunwind-dev libtool libxml2-dev make ninja \
13+ openssl-dev openssl-libs-static patch zip zstd-dev
14+
15+ # Borrow libpfm from cadvisor, so we don't have to build it ourselves
16+ # https://github.com/google/cadvisor/blob/master/deploy/Dockerfile
17+ COPY --from=libpfm_donor /usr/local/lib/libpfm.so* /usr/local/lib/
18+
19+ RUN make HELIO_USE_STATIC_LIBS=OFF release
20+
21+ RUN build-opt/dragonfly --version
22+
23+ FROM alpine:3.17.0
24+
25+ RUN apk --no-cache add libgcc libstdc++ libunwind boost1.77-fiber \
26+ 'su-exec>=0.2' netcat-openbsd
27+
28+ RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly
29+ RUN mkdir /data && chown dfly:dfly /data
30+
31+ VOLUME /data
32+ WORKDIR /data
33+ COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
34+ COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
35+ COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
36+
37+ HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
38+ ENTRYPOINT ["entrypoint.sh"]
39+
40+ EXPOSE 6379
41+
42+ CMD ["dragonfly", "--logtostderr"]
You can’t perform that action at this time.
0 commit comments