File tree Expand file tree Collapse file tree 4 files changed +30
-16
lines changed Expand file tree Collapse file tree 4 files changed +30
-16
lines changed Original file line number Diff line number Diff line change 11BUILD_ARCH := $(shell uname -m)
22RELEASE_NAME := "dragonfly-${BUILD_ARCH}"
33
4+ HELIO_RELEASE := $(if $(HELIO_RELEASE ) ,y,)
5+ HELIO_RELEASE_FLAGS = -DHELIO_RELEASE_FLAGS="-flto"
6+ HELIO_USE_STATIC_LIBS = ON
7+ HELIO_OPENSSL_USE_STATIC_LIBS = ON
8+ HELIO_ENABLE_GIT_VERSION = ON
9+ HELIO_WITH_UNWIND = OFF
10+
11+ HELIO_FLAGS = $(if $(HELIO_RELEASE ) ,-release $(HELIO_RELEASE_FLAGS ) ,) \
12+ -DBoost_USE_STATIC_LIBS=$(HELIO_USE_STATIC_LIBS ) \
13+ -DOPENSSL_USE_STATIC_LIBS=$(HELIO_OPENSSL_USE_STATIC_LIBS ) \
14+ -DENABLE_GIT_VERSION=$(HELIO_ENABLE_GIT_VERSION ) \
15+ -DWITH_UNWIND=$(HELIO_WITH_UNWIND ) \
16+
417.PHONY : default
518
619configure :
7- ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON \
8- -DENABLE_GIT_VERSION=ON -DWITH_UNWIND=OFF -DHELIO_RELEASE_FLAGS=" -flto"
20+ ./helio/blaze.sh $(HELIO_FLAGS )
921
1022build :
1123 cd build-opt; \
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22FROM gcr.io/cadvisor/cadvisor:v0.46.0 as libpfm_donor
33
4- FROM alpine:3.17.0 as build
5-
6- WORKDIR /build
7-
8- COPY . ./
4+ FROM alpine:3.17.0 as builder
95
106# "openssl-libs-static" fixes "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the"
117RUN apk add autoconf-archive automake bash bison boost-dev cmake coreutils \
128 curl ccache git gcc gdb g++ libunwind-dev libtool libxml2-dev make ninja \
139 openssl-dev openssl-libs-static patch zip zstd-dev
1410
11+ # This is required to make static linking work
12+ RUN ls -1 /usr/lib/libboost_*.so | while read -r _file; do ln -sfv ${_file} ${_file//.so/.a}; done
13+
1514# Borrow libpfm from cadvisor, so we don't have to build it ourselves
1615# https://github.com/google/cadvisor/blob/master/deploy/Dockerfile
1716COPY --from=libpfm_donor /usr/local/lib/libpfm.so* /usr/local/lib/
1817
19- RUN make HELIO_USE_STATIC_LIBS=OFF release
18+ WORKDIR /build
19+
20+ COPY . ./
21+
22+ RUN make HELIO_RELEASE=y release
2023
2124RUN build-opt/dragonfly --version
2225
2326FROM alpine:3.17.0
2427
25- RUN apk --no-cache add libgcc libstdc++ libunwind boost1.77-fiber \
26- 'su-exec>=0.2' netcat-openbsd
28+ RUN apk --no-cache add libgcc libstdc++ libunwind boost1.80-fiber zstd-dev su-exec netcat-openbsd
2729
2830RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly
2931RUN mkdir /data && chown dfly:dfly /data
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22FROM ubuntu:20.04 as builder
33
4- WORKDIR /build
5-
6- COPY . ./
7-
84RUN \
95 rm -f /etc/apt/apt.conf.d/docker-clean; \
106 echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
2117RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \
2218 --slave /usr/bin/g++ g++ /usr/bin/g++-9
2319
24- RUN make release
20+ WORKDIR /build
21+
22+ COPY . ./
23+
24+ RUN make HELIO_RELEASE=y release
2525
2626RUN build-opt/dragonfly --version
2727
Original file line number Diff line number Diff line change 1212
1313pwd
1414
15- make release
15+ make HELIO_RELEASE=y release
1616
1717build-opt/dragonfly --version
1818
You can’t perform that action at this time.
0 commit comments