mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-06-26 02:10:04 +00:00
Compare commits
3 Commits
ecc3e7731c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
574d3111bc
|
|||
|
424f83ed94
|
|||
|
cd7caafec7
|
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
**/*.o
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,36 +1,34 @@
|
||||
# build
|
||||
FROM alpine:3 as build
|
||||
FROM debian:trixie-slim as build
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk update && apk upgrade && apk add \
|
||||
linux-headers \
|
||||
RUN apt update && apt upgrade -y && apt install -y \
|
||||
git \
|
||||
clang18 \
|
||||
make \
|
||||
sqlite-dev
|
||||
clang \
|
||||
build-essential \
|
||||
libsqlite3-dev
|
||||
|
||||
COPY src ./src
|
||||
COPY vendor ./vendor
|
||||
COPY .git ./.git
|
||||
COPY Makefile CMakeLists.txt version.h.in ./
|
||||
|
||||
RUN sed -i 's/^CC=clang$/&-18/' Makefile
|
||||
RUN sed -i 's/^CXX=clang++$/&-18/' Makefile
|
||||
|
||||
RUN make nosandbox -j$(nproc)
|
||||
|
||||
# export-only stage: `docker build --target=export --output=./bin .`
|
||||
FROM scratch AS export
|
||||
COPY --from=build /usr/src/app/bin/fusion /fusion
|
||||
|
||||
# prod
|
||||
FROM alpine:3
|
||||
FROM debian:trixie-slim
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk update && apk upgrade && apk add \
|
||||
libstdc++ \
|
||||
sqlite-dev
|
||||
RUN apt update && apt upgrade -y && apt install -y \
|
||||
libsqlite3-dev
|
||||
|
||||
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
|
||||
COPY sql ./sql
|
||||
|
||||
CMD ["/bin/fusion"]
|
||||
|
||||
|
||||
1
build_docker.sh
Executable file
1
build_docker.sh
Executable file
@@ -0,0 +1 @@
|
||||
docker build --target=export --output=./bin .
|
||||
@@ -8,6 +8,7 @@ services:
|
||||
- ./config.ini:/usr/src/app/config.ini
|
||||
- ./database.db:/usr/src/app/database.db
|
||||
- ./tdata:/usr/src/app/tdata
|
||||
- ./sql:/usr/src/app/sql
|
||||
ports:
|
||||
- "23000:23000"
|
||||
- "23001:23001"
|
||||
|
||||
Reference in New Issue
Block a user