OpenFusion/Dockerfile

37 lines
607 B
Docker
Raw Normal View History

2024-05-08 03:11:14 +00:00
# build
FROM debian:stable-slim AS build
2023-06-23 01:46:24 +00:00
WORKDIR /usr/src/app
RUN apt-get -y update && apt-get install -y \
git \
clang \
make \
libsqlite3-dev
2024-05-08 03:11:14 +00:00
COPY src ./src
COPY vendor ./vendor
COPY .git ./.git
COPY Makefile CMakeLists.txt version.h.in ./
2023-06-23 01:46:24 +00:00
RUN make nosandbox -j$(nproc)
2023-06-23 01:46:24 +00:00
2024-05-08 03:11:14 +00:00
# prod
FROM debian:stable-slim
2024-05-08 03:11:14 +00:00
WORKDIR /usr/src/app
RUN apt-get -y update && apt-get install -y \
libsqlite3-dev
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
COPY sql ./sql
2023-06-23 01:46:24 +00:00
2024-05-08 03:11:14 +00:00
CMD ["/bin/fusion"]
2023-06-23 01:46:24 +00:00
EXPOSE 23000/tcp
EXPOSE 23001/tcp
EXPOSE 8001/tcp
LABEL Name=openfusion Version=1.6.0