This commit is contained in:
Your Name
2025-04-30 21:30:55 +12:00
parent 69ecc77d51
commit fe9c940a22
14 changed files with 26367 additions and 2 deletions

41
Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
FROM alpine:latest AS builder
# Install build dependencies
RUN apk add --no-cache \
build-base \
cmake \
git \
musl-dev \
nlohmann-json-dev
# Copy source code
COPY . /src
WORKDIR /src
# Build
RUN mkdir build && cd build && \
cmake .. && \
make -j$(nproc)
# Create final image
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache \
libstdc++
# Copy binary from builder
COPY --from=builder /src/build/dropshell_template_registry /usr/local/bin/
# Create data directory
RUN mkdir -p /data
VOLUME /data
# Set working directory
WORKDIR /data
# Expose port
EXPOSE 80
# Run server
CMD ["dropshell_template_registry", "/data/config.json"]