-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (33 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Build:
# docker build --tag projectm-emscripten-builder .
#
# Run:
# docker run --rm -t -u $(id -u):$(id -g) -v $(pwd):/src projectm-emscripten-builder emcc ...
FROM emscripten/emsdk:3.1.61
ARG PROJECTM_VERSION=4.1.1
RUN apt-get update && apt-get install -y --no-install-recommends \
# libprojectM build tools and dependencies
# https://github.com/projectM-visualizer/projectm/wiki/Building-libprojectM#install-the-build-tools-and-dependencies
libgl1-mesa-dev \
libglm-dev \
mesa-common-dev \
&& rm -rf /var/lib/apt/lists/* \
# download projectM
&& wget https://github.com/projectM-visualizer/projectm/releases/download/v$PROJECTM_VERSION/libprojectM-$PROJECTM_VERSION.tar.gz \
&& tar xzf libprojectM-*.tar.gz \
&& rm libprojectM-*.tar.gz \
&& cd libprojectM-* \
# build projectM
# https://github.com/projectM-visualizer/projectm/blob/master/BUILDING-cmake.md
&& mkdir build \
&& cd build \
&& emcmake cmake .. \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D ENABLE_EMSCRIPTEN=1 \
&& emmake cmake \
--build . \
--target install \
--config Release \
# allow container to be run as a non-root user
&& chmod 777 /emsdk/upstream/emscripten/cache/symbol_lists*