-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 989 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (23 loc) · 989 Bytes
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
# syntax=docker/dockerfile:1
FROM debian:bookworm-slim AS build
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git ca-certificates libcurl4-openssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DWSF_BUILD_CLI=ON -DWSF_BUILD_SERVER=ON -DWSF_BUILD_TESTS=ON -DWSF_BUILD_PYTHON=OFF \
&& cmake --build build -j \
&& ctest --test-dir build --output-on-failure
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libcurl4 curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/build/wsf /usr/local/bin/wsf
EXPOSE 8080
ENV WSF_SEARX_URL=
ENV WSF_BASE_URL=http://127.0.0.1:8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS http://127.0.0.1:8080/health >/dev/null || exit 1
ENTRYPOINT ["wsf"]
CMD ["serve", "--host", "0.0.0.0", "--port", "8080"]