mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Add Dockerfile to build in a Docker container
update readme for instruction on how to build in Docker Change-Id: I6c450db3502ea6f96407b745fffc22a791976a33
This commit is contained in:
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@ -0,0 +1,9 @@
|
||||
build-local/
|
||||
contrib/native*
|
||||
contrib/i386*
|
||||
contrib/x86_64-*
|
||||
contrib/arm*
|
||||
contrib/aarch64*
|
||||
contrib/i686*
|
||||
|
||||
.git/
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -91,6 +91,8 @@ nbproject
|
||||
*.kdev*
|
||||
tools/.vscode/
|
||||
.vscode/
|
||||
.idea/
|
||||
*iml
|
||||
|
||||
# JNI generated files
|
||||
*_wrap.cpp
|
||||
|
70
Dockerfile
Normal file
70
Dockerfile
Normal file
@ -0,0 +1,70 @@
|
||||
FROM ubuntu:22.04 AS jami-daemon
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG config_args
|
||||
RUN apt-get update && apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
bison \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libarchive-dev \
|
||||
libasio-dev \
|
||||
libasound2-dev \
|
||||
libdbus-1-dev \
|
||||
libdbus-c++-dev \
|
||||
libexpat1-dev \
|
||||
libfmt-dev \
|
||||
libgnutls28-dev \
|
||||
libjsoncpp-dev \
|
||||
libmsgpack-dev \
|
||||
libnatpmp-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libspeex-dev \
|
||||
libspeexdsp-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libudev-dev \
|
||||
libupnp-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libvpx-dev \
|
||||
libx264-dev \
|
||||
libyaml-cpp-dev \
|
||||
nasm \
|
||||
pkg-config \
|
||||
yasm
|
||||
|
||||
# Install Node
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
npm install -g node-gyp
|
||||
|
||||
# Install latest Swig (4.1)
|
||||
WORKDIR /swig
|
||||
RUN git clone https://github.com/swig/swig.git && \
|
||||
cd swig && \
|
||||
./autogen.sh && \
|
||||
./configure && \
|
||||
make -j$(nproc) && \
|
||||
make install
|
||||
|
||||
WORKDIR /daemon
|
||||
COPY contrib/ contrib/
|
||||
|
||||
# Build daemon dependencies
|
||||
RUN mkdir -p contrib/native && \
|
||||
cd contrib/native && \
|
||||
../bootstrap && \
|
||||
make -j$(nproc)
|
||||
|
||||
COPY . .
|
||||
|
||||
# Build the daemon
|
||||
RUN ./autogen.sh && \
|
||||
./configure $config_args && \
|
||||
make -j$(nproc)
|
11
README
11
README
@ -159,6 +159,17 @@ add to ./configure: --prefix=<prefix_path>
|
||||
|
||||
Do a little dance!
|
||||
|
||||
How to compile in a Docker container
|
||||
-----------------------
|
||||
|
||||
docker build --tag jami-daemon .
|
||||
|
||||
# To build with custom build args
|
||||
|
||||
```bash
|
||||
docker build --tag jami-daemon --build-arg config_args="--with-nodejs" .
|
||||
```
|
||||
|
||||
|
||||
Common Issues
|
||||
-------------
|
||||
|
Reference in New Issue
Block a user