build: add dockerfiles for deb and rpm

This commit is contained in:
Carlos Gomes Martinho 2020-03-23 11:11:43 +01:00 committed by Carlos Gomes Martinho
parent 433b3c4219
commit 576da85302
3 changed files with 30 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/_build
/build

14
Dockerfile.deb Normal file
View File

@ -0,0 +1,14 @@
# docker build . -f Dockerfile.deb -t deb_builder
FROM ubuntu
RUN apt update -y && apt install -y cmake gcc g++ make
COPY . /tmp
RUN cd /tmp && \
mkdir build && \
cd build && \
cmake .. -DLIBMBUS_PACKAGE_DEB=ON && \
cpack .. && \
ls -al && \
dpkg -i *.deb

14
Dockerfile.rpm Normal file
View File

@ -0,0 +1,14 @@
# docker build . -f Dockerfile.rpm -t rpm_builder
FROM fedora
RUN dnf install -y cmake gcc g++ make rpm-build
COPY . /tmp
RUN cd /tmp && \
mkdir build && \
cd build && \
cmake .. -DLIBMBUS_PACKAGE_RPM=ON && \
cpack .. && \
ls -al && \
rpm -i *.rpm