1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00

fix: weekly build (#1871)

* fix: weekly build

* Update tools/packaging/Dockerfile.ubuntu-prod

Co-authored-by: Roy Jacobson <roy@dragonflydb.io>
Signed-off-by: Roman Gershman <romange@gmail.com>

---------

Signed-off-by: Roman Gershman <romange@gmail.com>
Co-authored-by: Roy Jacobson <roy@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-09-18 14:41:40 +03:00 committed by GitHub
parent db21b735f6
commit 0be2d98f27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 27 deletions

View file

@ -1,21 +1,5 @@
# syntax=docker/dockerfile:1
FROM ubuntu:20.04 as builder
RUN \
rm -f /etc/apt/apt.conf.d/docker-clean; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
export DEBIAN_FRONTEND=noninteractive && \
apt update && \
apt install -q -y autoconf-archive cmake curl git libssl-dev \
libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-context-dev \
zip libzstd-dev bison
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \
--slave /usr/bin/g++ g++ /usr/bin/g++-9
FROM ghcr.io/romange/ubuntu-dev:20 as builder
WORKDIR /build
@ -30,18 +14,17 @@ RUN curl -O https://raw.githubusercontent.com/ncopa/su-exec/212b75144bbc06722fbd
FROM ubuntu:20.04
RUN \
--mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt \
export DEBIAN_FRONTEND=noninteractive && \
RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
apt update && \
apt install -q -y netcat-openbsd redis-tools libxml2
apt install -q -y --no-install-recommends netcat-openbsd ca-certificates redis-tools
RUN groupadd -r -g 999 dfly && useradd -r -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/su-exec /usr/local/bin/

View file

@ -7,7 +7,9 @@ WORKDIR /build
COPY tools/docker/fetch_release.sh /tmp/
COPY releases/dragonfly-* /tmp/
RUN curl -O https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c && \
ARG SUEXEC_HASH d6c40440609a23483f12eb6295b5191e94baf08298a856bab6e15b10c3b82891
RUN curl -O https://raw.githubusercontent.com/ncopa/su-exec/212b75144bbc06722fbd7661f651390dc47a43d1/su-exec.c && \
if [ "$SUEXEC_HASH" != $(sha256sum su-exec.c | awk '{print $1}') ]; then echo "Wrong hash!" && exit 1; fi && \
gcc -Wall -O2 su-exec.c -o su-exec
RUN /tmp/fetch_release.sh ${TARGETPLATFORM}
@ -20,7 +22,10 @@ FROM ubuntu:20.04
ARG QEMU_CPU
ARG DEBIAN_FRONTEND=noninteractive
RUN apt clean && apt update && apt -y install netcat-openbsd ca-certificates redis-tools
RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
apt -q update && \
apt install -q -y --no-install-recommends netcat-openbsd ca-certificates redis-tools
RUN groupadd -r -g 999 dfly && useradd -r -g dfly -u 999 dfly
RUN mkdir /data && chown dfly:dfly /data