1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: alpine weekly pipeline (#1811)

1. Move docker build files to separate dir from docker script files
   so that they won't be part of build context. Update dockerignore as well
2. Fix lib dependencies for alpine

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-09-06 11:27:40 +03:00 committed by GitHub
parent aa4cadfa12
commit 4e393cf742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 9 deletions

View file

@ -1,2 +1,3 @@
_deps/*
build-*
build-*
tools/packaging/*

View file

@ -53,10 +53,10 @@ jobs:
matrix:
include:
- flavor: alpine
dockerfile: tools/docker/Dockerfile.alpine
dockerfile: tools/packaging/Dockerfile.alpine
tag_main: false
- flavor: ubuntu
dockerfile: tools/docker/Dockerfile.ubuntu
dockerfile: tools/packaging/Dockerfile.ubuntu
tag_main: true
steps:
- name: checkout

View file

@ -6,7 +6,7 @@ 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 \
curl ccache git gcc gdb g++ libunwind-dev libtool libxml2-dev make ninja \
openssl-dev openssl-libs-static patch zip zstd-dev icu-dev
openssl-dev openssl-libs-static patch zip zstd-static icu-dev
# 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
@ -25,17 +25,18 @@ RUN build-opt/dragonfly --version
FROM alpine:3
RUN apk --no-cache add libgcc libstdc++ libunwind boost-context \
zstd-dev su-exec netcat-openbsd openssl libxml2
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 apk --no-cache add libgcc libstdc++ \
su-exec netcat-openbsd libxml2 icu 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
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/
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
ENTRYPOINT ["entrypoint.sh"]