Migrate docker support to meson
- bmcweb seems to have x86 docker support which was broken
due to build system migration.
- This commit would migrate the docker to leverage the meson
build system.
- There are a couple of changes that are needed to for meson :
- Right now meson does not support the subprojects to be downloaded
elsewhere other than subprojects directory, because of that we
cannot delete the source directory in the bmcweb-base container as
that affect the incremental builds.
- Docker infrastructure had now does not by-default allow DNS lookups
for the latest rpm-based distributions, because of which I need to
add --network to the base container(so that apt update succeeds)
Tested By:
- Was able to successfully compile bmcweb & tests in a container and
was able to get the build directory out of the container to the host
machine post completion.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ica23bd3de22e262a27c91167181161fc459cda0d
diff --git a/Dockerfile.base b/Dockerfile.base
index ca12ab7..d4d2974 100644
--- a/Dockerfile.base
+++ b/Dockerfile.base
@@ -3,13 +3,13 @@
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y libpam0g-dev libssl-dev zlib1g-dev pkg-config xxd cmake \
libgtest-dev libgmock-dev ninja-build python3 autoconf-archive autoconf \
- build-essential git libsystemd-dev systemd python3-wheel python3-pip \
+ build-essential git libsystemd-dev systemd libtinyxml2-dev python3-wheel python3-pip \
python3-yaml python3-mako python3-inflection python3-setuptools && \
pip3 install meson
ADD . /source
-RUN mkdir -p /build && cd /build && cmake -DYOCTO_DEPENDENCIES=OFF /source && \
- cmake --build . && rm -rf /source
+RUN cd source && meson setup build && \
+ meson compile -C build
WORKDIR /build