Skip to content

Commit 4932008

Browse files
committed
Add Arch Linux Docker build support
- Add Dockerfile.archlinux with all required Arch Linux build dependencies - Update building.md with Docker build and test instructions for Arch Linux
1 parent c790ed7 commit 4932008

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

Dockerfile.archlinux

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dockerfile for building and testing Element on Arch Linux
2+
# This creates a build environment - mount your source code as a volume
3+
FROM archlinux:latest
4+
5+
# Update system and install dependencies
6+
RUN pacman -Syu --noconfirm && \
7+
pacman -S --noconfirm \
8+
git \
9+
base-devel \
10+
cmake \
11+
ninja \
12+
pkgconf \
13+
boost \
14+
freetype2 \
15+
fontconfig \
16+
libx11 \
17+
libxext \
18+
libxrandr \
19+
libxcomposite \
20+
libxinerama \
21+
libxrender \
22+
libxcursor \
23+
alsa-lib \
24+
jack2 \
25+
lv2 \
26+
lilv \
27+
suil \
28+
ladspa \
29+
curl \
30+
ttf-roboto \
31+
clang \
32+
pandoc \
33+
ccache && \
34+
pacman -Scc --noconfirm
35+
36+
# Set up working directory
37+
WORKDIR /workspace
38+
39+
# Default command
40+
CMD ["/bin/bash"]

docs/building.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,31 @@ sudo pacman -S git base-devel cmake ninja pkgconf boost \
3838
ladspa curl ttf-roboto clang
3939
```
4040

41+
### Checking With Docker
42+
43+
You can also build in a Docker container without installing packages on your system:
44+
45+
```bash
46+
# Build the Arch Linux environment image
47+
docker build -f Dockerfile.archlinux -t element:archlinux .
48+
49+
# Build the project with your source mounted as a volume
50+
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/workspace element:archlinux bash -c "
51+
git config --global --add safe.directory /workspace && \
52+
git submodule update --init --recursive && \
53+
cmake -B build-arch -G Ninja -DCMAKE_BUILD_TYPE=Release -DELEMENT_BUILD_PLUGINS=ON && \
54+
cmake --build build-arch && \
55+
ctest --test-dir build-arch --output-on-failure
56+
"
57+
```
58+
59+
Or run interactively:
60+
```bash
61+
docker run --rm -it --user $(id -u):$(id -g) -v $(pwd):/workspace element:archlinux
62+
# Then run cmake commands manually inside the container
63+
```
64+
65+
4166
## Mac OSX
4267
__Dependencies__
4368

0 commit comments

Comments
 (0)