-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (37 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
47 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Multi-platform Docker image for tskibd
FROM ubuntu:22.04 AS builder
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
ca-certificates \
build-essential \
g++ \
pkg-config \
meson \
ninja-build \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /build
# Clone the repository with submodules
RUN git clone --recursive https://github.com/bguo068/tskibd.git . && \
if [ -f tskit/c/VERSION ]; then mv tskit/c/VERSION tskit/c/VERSION.txt; fi
# Build tskibd
RUN meson setup build && \
ninja -C build tskibd
# Runtime stage - smaller image
FROM ubuntu:22.04
# Install runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libstdc++6 \
&& rm -rf /var/lib/apt/lists/*
# Copy the compiled binary
COPY --from=builder /build/build/tskibd /usr/local/bin/tskibd
# Create working directory for data
WORKDIR /data
# Set entrypoint
ENTRYPOINT ["tskibd"]
CMD ["--help"]