1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/tools/docker/Dockerfile.alpine-prod
2022-02-27 15:40:20 +02:00

33 lines
No EOL
833 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
WORKDIR build-opt
RUN ninja dragonfly
FROM alpine:latest
LABEL org.opencontainers.image.title Dragonfly
LABEL org.opencontainers.image.source https://github.com/romange/dragonfly
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'
RUN mkdir /data && chown dfly:dfly /data
VOLUME /data
WORKDIR /data
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
RUN dragonfly -version
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 6380
CMD ["dragonfly", "--logtostderr"]