mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-16 14:34:54 +02:00
now it looks like this: ``` > docker run --rm ghcr.io/dragonflydb/dragonfly-dev:ubuntu-f767d82 --version dragonfly f767d82-f767d82ce78ccbc90ddfb525f4ad4bd9aafcfbed ``` fixes #4830 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
51 lines
1.5 KiB
Text
51 lines
1.5 KiB
Text
# syntax=docker/dockerfile:1
|
|
FROM gcr.io/cadvisor/cadvisor:v0.46.0 AS libpfm_donor
|
|
|
|
FROM alpine:3 AS builder
|
|
|
|
# "openssl-libs-static" fixes "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the"
|
|
RUN apk add autoconf-archive automake bash bison boost-dev cmake coreutils net-tools \
|
|
curl ccache git gcc gdb g++ libunwind-dev libtool make ninja \
|
|
openssl-dev openssl-libs-static patch zip zstd-static
|
|
|
|
# This is required to make static linking work
|
|
RUN ls -1 /usr/lib/libboost_*.so | while read -r _file; do ln -sfv ${_file} ${_file//.so/.a}; done
|
|
|
|
# Borrow libpfm from cadvisor, so we don't have to build it ourselves
|
|
# https://github.com/google/cadvisor/blob/master/deploy/Dockerfile
|
|
COPY --from=libpfm_donor /usr/local/lib/libpfm.so* /usr/local/lib/
|
|
|
|
WORKDIR /build
|
|
|
|
COPY ./Makefile ./CMakeLists.txt ./
|
|
COPY src ./src
|
|
|
|
COPY .git ./.git
|
|
COPY cmake ./cmake
|
|
COPY helio ./helio
|
|
|
|
RUN make release
|
|
|
|
RUN build-release/dragonfly --version
|
|
|
|
FROM alpine:3
|
|
|
|
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-release/dragonfly /usr/local/bin/
|
|
|
|
RUN apk --no-cache add libgcc libstdc++ \
|
|
setpriv netcat-openbsd boost-context && ldd /usr/local/bin/dragonfly
|
|
|
|
RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly
|
|
RUN mkdir /data && chown dfly:dfly /data
|
|
|
|
VOLUME /data
|
|
WORKDIR /data
|
|
|
|
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
|
|
ENTRYPOINT ["entrypoint.sh"]
|
|
|
|
EXPOSE 6379
|
|
|
|
CMD ["dragonfly", "--logtostderr"]
|