Seems to be fully statically built now.
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 1m15s
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 1m15s
This commit is contained in:
34
source/Dockerfile
Normal file
34
source/Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM alpine:latest
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
cmake \
|
||||
git \
|
||||
musl-dev \
|
||||
curl \
|
||||
bash \
|
||||
musl \
|
||||
g++ \
|
||||
ninja \
|
||||
linux-headers
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Copy source files
|
||||
COPY . .
|
||||
|
||||
# Configure and build
|
||||
RUN mkdir -p build_static
|
||||
|
||||
RUN cmake -G Ninja -B build_static -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER=gcc \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
||||
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
RUN cmake --build build_static
|
||||
|
||||
# The resulting binary will be in build_static/dropshell
|
Reference in New Issue
Block a user