mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 13:10:05 +00:00
51615db230
* CD - Add GitHub Action to push Docker image to Docker Hub * BUILD - Reduce size of image by using slim version of Debian * CI - Modify Push Docker Image action to build and push Docker image to linux/amd64 and linux/arm64 architectures
33 lines
535 B
Docker
33 lines
535 B
Docker
# build
|
|
FROM debian:stable-slim as build
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apt-get -y update && apt-get install -y \
|
|
git \
|
|
clang \
|
|
make \
|
|
libsqlite3-dev
|
|
|
|
COPY src ./src
|
|
COPY vendor ./vendor
|
|
COPY .git ./.git
|
|
COPY Makefile CMakeLists.txt version.h.in ./
|
|
|
|
RUN make -j8
|
|
|
|
# prod
|
|
FROM debian:stable-slim
|
|
|
|
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
|
|
|
|
CMD ["/bin/fusion"]
|
|
|
|
LABEL Name=openfusion Version=0.0.2
|