dragonfly/tools/docker/Dockerfile.alpine-prod

33 lines
833 B
Docker

# 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"]