-
-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathDockerfile.native
More file actions
43 lines (33 loc) · 1.54 KB
/
Dockerfile.native
File metadata and controls
43 lines (33 loc) · 1.54 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
# Native image Dockerfile for SirixDB REST API
# Uses pre-built native binary from `./gradlew :sirix-rest-api:nativeCompile`
#
# Build: docker build -f Dockerfile.native -t sirixdb/sirix:native .
# Run: docker run -p 9443:9443 -v $(pwd)/sirix-data:/opt/sirix/sirix-data sirixdb/sirix:native
FROM debian:bookworm-slim
LABEL maintainer="Johannes Lichtenberger <johannes.lichtenberger@sirix.io>"
# Install minimal dependencies for the native binary
RUN apt-get update && apt-get install -y --no-install-recommends \
libz-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV VERTICLE_HOME=/opt/sirix
WORKDIR /opt/sirix
# Copy native binary and supporting library
COPY bundles/sirix-rest-api/build/native/nativeCompile/sirix-rest-api ./
COPY bundles/sirix-rest-api/build/native/nativeCompile/libjsvml.so ./
# Copy configuration files
RUN mkdir -p ./sirix-data/
COPY bundles/sirix-rest-api/src/test/resources/logback-test.xml ./sirix-data/
COPY bundles/sirix-rest-api/src/main/resources/cert.pem ./sirix-data/
COPY bundles/sirix-rest-api/src/main/resources/key.pem ./sirix-data/
COPY bundles/sirix-rest-api/src/main/resources/sirix-docker-conf.json ./
# Create non-root user for security
RUN groupadd -r sirix && useradd -r -g sirix -d /opt/sirix -s /sbin/nologin sirix \
&& chown -R sirix:sirix /opt/sirix
# Ensure binary is executable
RUN chmod +x sirix-rest-api
EXPOSE 9443
USER sirix
# VertxApplication with picocli — pass verticle name and config file
ENTRYPOINT ["./sirix-rest-api"]
CMD ["io.sirix.rest.SirixVerticle", "-conf", "sirix-docker-conf.json"]