Use sudo static Docker builds

This commit is contained in:
Sergey Stepanov 2023-10-17 19:12:54 +03:00 committed by sergystepanov
parent e8cec39476
commit 9c768277c7
3 changed files with 7 additions and 5 deletions

View file

@ -3,7 +3,7 @@ ARG VERSION=master
# base build stage
FROM ubuntu:lunar AS build0
ARG GO=1.20.7
ARG GO=1.20.8
ARG GO_DIST=go${GO}.linux-amd64.tar.gz
ADD https://go.dev/dl/$GO_DIST ./
@ -47,11 +47,12 @@ WORKDIR ${BUILD_PATH}
# install deps
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
gcc \
build-essential \
libopus-dev \
libsdl2-dev \
libvpx-dev \
libyuv-dev \
libjpeg-turbo8-dev \
libx264-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

View file

@ -61,13 +61,13 @@ a better sense of performance.
```
# Ubuntu / Windows (WSL2)
apt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev
apt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev libjpeg-turbo8-dev
# MacOS
brew install pkg-config libvpx x264 opus sdl2 jpeg-turbo
# Windows (MSYS2)
pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkgconf,dlfcn,libvpx,opus,x264-git,SDL2,libyuv}
pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkgconf,dlfcn,libvpx,opus,x264-git,SDL2,libyuv,libjpeg-turbo}
```
Because the coordinator and workers need to run simultaneously. Workers connect to the coordinator.

View file

@ -3,7 +3,8 @@
package libyuv
/*
#cgo !darwin LDFLAGS: -lyuv
#cgo !darwin,!st LDFLAGS: -lyuv
#cgo !darwin,st LDFLAGS: -l:libyuv.a -l:libjpeg.a -lstdc++
#cgo darwin CFLAGS: -DINCLUDE_LIBYUV_VERSION_H_
#cgo darwin LDFLAGS: -L${SRCDIR} -lstdc++