-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (48 loc) · 1.87 KB
/
Dockerfile
File metadata and controls
62 lines (48 loc) · 1.87 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:22.04 AS builder
# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libz-dev \
python3 \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Create a working directory
WORKDIR /app
# Copy the source code
COPY . .
# Build VCFX
RUN mkdir -p build && \
cd build && \
cmake .. && \
make -j$(nproc)
# Create a smaller runtime image
FROM ubuntu:22.04
# Add metadata labels
LABEL org.opencontainers.image.title="VCFX"
LABEL org.opencontainers.image.description="A comprehensive VCF manipulation toolkit"
LABEL org.opencontainers.image.url="https://github.com/ieeta-pt/VCFX"
LABEL org.opencontainers.image.documentation="https://ieeta-pt.github.io/VCFX/"
LABEL org.opencontainers.image.source="https://github.com/ieeta-pt/VCFX"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.citation="Silva, J.M., Oliveira, J.L. (2025). VCFX: A Minimalist, Modular Toolkit for Streamlined Variant Analysis. IWBBIO 2025."
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
libz1 \
&& rm -rf /var/lib/apt/lists/*
# Copy the built executables from builder stage
COPY --from=builder /app/build/src /usr/local/bin/
# Create a directory for data
WORKDIR /data
# Add the helper scripts
COPY add_vcfx_tools_to_path.sh /usr/local/bin/
COPY docker_entrypoint.sh /usr/local/bin/
# Make them executable
RUN chmod +x /usr/local/bin/add_vcfx_tools_to_path.sh /usr/local/bin/docker_entrypoint.sh
# Use a custom entrypoint that sets up PATH for the tools
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]
# Default command shows available tools
CMD ["bash", "-c", "echo 'VCFX Toolkit is ready. Run any VCFX tool by name, for example:' && ls -1 /usr/local/bin/VCFX_* | xargs -n1 basename"]