mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-27 05:01:41 +02:00
Refactor
This commit is contained in:
parent
907e32187c
commit
cac80a22a3
@ -22,9 +22,8 @@ RUN cd /tmp/libwebp-1.0.2 && \
|
|||||||
./configure --enable-static --disable-shared && \
|
./configure --enable-static --disable-shared && \
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y cmake nasm gcc
|
COPY builder/scripts /scripts
|
||||||
RUN git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git
|
RUN /scripts/build-libjpeg-turbo
|
||||||
RUN export MAKEFLAGS=-j`nproc`; export CFLAGS="-fno-semantic-interposition -fpic -flto"; cd libjpeg-turbo && cmake -DCMAKE_INSTALL_PREFIX=/usr/ -G"Unix Makefiles" && make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
30
builder/scripts/build-libjpeg-turbo
Executable file
30
builder/scripts/build-libjpeg-turbo
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
build_and_install() {
|
||||||
|
export MAKEFLAGS=-j`nproc`
|
||||||
|
export CFLAGS="-fno-semantic-interposition -fpic -flto"
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
}
|
||||||
|
|
||||||
|
install_build_dependencies() {
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y cmake gcc
|
||||||
|
ensure_libjpeg_is_fast
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_libjpeg_is_fast() {
|
||||||
|
apt-get install -y nasm
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_libjpeg_source() {
|
||||||
|
git clone --depth=1 https://github.com/libjpeg-turbo/libjpeg-turbo.git
|
||||||
|
cd libjpeg-turbo
|
||||||
|
}
|
||||||
|
|
||||||
|
install_build_dependencies
|
||||||
|
prepare_libjpeg_source
|
||||||
|
build_and_install
|
Loading…
x
Reference in New Issue
Block a user