mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
32 lines
870 B
Text
32 lines
870 B
Text
# syntax=docker/dockerfile:1
|
|
from ghcr.io/romange/alpine-dev as builder
|
|
|
|
WORKDIR /build
|
|
COPY src/ ./src/
|
|
COPY helio/ ./helio/
|
|
COPY patches/ ./patches/
|
|
COPY CMakeLists.txt ./
|
|
RUN ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON
|
|
|
|
WORKDIR build-opt
|
|
RUN ninja dragonfly
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly
|
|
RUN apk --no-cache add libgcc libstdc++ libunwind boost1.77-fiber \
|
|
'su-exec>=0.2' netcat-openbsd openssl
|
|
|
|
RUN mkdir /data && chown dfly:dfly /data
|
|
VOLUME /data
|
|
WORKDIR /data
|
|
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
|
|
COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
|
|
RUN dragonfly -version
|
|
|
|
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
|
|
ENTRYPOINT ["entrypoint.sh"]
|
|
|
|
EXPOSE 6380
|
|
CMD ["dragonfly", "--logtostderr"]
|