dropshell/source/Dockerfile
Your Name 1b35f74bfe
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 1m15s
Seems to be fully statically built now.
2025-05-25 23:47:12 +12:00

34 lines
645 B
Docker

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