2024-05-08 03:11:14 +00:00
|
|
|
# build
|
2024-06-09 02:55:03 +00:00
|
|
|
FROM alpine:3 as build
|
2023-06-23 01:46:24 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2024-06-09 02:55:03 +00:00
|
|
|
RUN apk update && apk upgrade && apk add \
|
|
|
|
linux-headers \
|
2023-06-23 01:46:24 +00:00
|
|
|
git \
|
2024-06-09 02:55:03 +00:00
|
|
|
clang18 \
|
2023-06-23 01:46:24 +00:00
|
|
|
make \
|
2024-06-09 02:55:03 +00:00
|
|
|
sqlite-dev
|
2023-06-23 01:46:24 +00:00
|
|
|
|
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
|
|
|
|
2024-06-09 02:55:03 +00:00
|
|
|
RUN sed -i 's/^CC=clang$/&-18/' Makefile
|
|
|
|
RUN sed -i 's/^CXX=clang++$/&-18/' Makefile
|
|
|
|
|
2024-10-15 06:00:37 +00:00
|
|
|
RUN make nosandbox -j$(nproc)
|
2023-06-23 01:46:24 +00:00
|
|
|
|
2024-05-08 03:11:14 +00:00
|
|
|
# prod
|
2024-06-09 02:55:03 +00:00
|
|
|
FROM alpine:3
|
2024-05-08 03:11:14 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2024-06-09 02:55:03 +00:00
|
|
|
RUN apk update && apk upgrade && apk add \
|
|
|
|
libstdc++ \
|
|
|
|
sqlite-dev
|
2024-05-08 03:11:14 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2024-10-15 06:00:37 +00:00
|
|
|
EXPOSE 23000/tcp
|
|
|
|
EXPOSE 23001/tcp
|
2024-10-29 04:26:25 +00:00
|
|
|
EXPOSE 8003/tcp
|
2024-10-15 06:00:37 +00:00
|
|
|
|
|
|
|
LABEL Name=openfusion Version=1.6.0
|