From 4c8a54b8f22f4c034ea128726f2a70f53fb9e9a8 Mon Sep 17 00:00:00 2001 From: sergystepanov Date: Fri, 1 May 2026 11:30:02 +0300 Subject: [PATCH] Update to ubuntu:plucky Use the dynamic x264 library because the static libx264.a was removed from the packages in the latest Ubuntu. --- Dockerfile | 7 ++++--- pkg/encoder/h264/x264.go | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a1396a4..1319cfd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG BUILD_PATH=/tmp/cloud-game ARG VERSION=master # base build stage -FROM ubuntu:plucky AS build0 +FROM ubuntu:resolute AS build0 ARG GO=1.26.0 ARG GO_DIST=go${GO}.linux-amd64.tar.gz @@ -60,7 +60,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ # by default we ignore all except some folders and files, see .dockerignore COPY . ./ -RUN --mount=type=cache,target=/root/.cache/go-build make GO_TAGS=static,st build.worker +RUN --mount=type=cache,target=/root/.cache/go-build make GO_TAGS=static,st,x264s build.worker RUN find ./bin/* | xargs upx --best --lzma WORKDIR /usr/local/share/cloud-game @@ -74,12 +74,13 @@ COPY --from=build_coordinator /usr/local/share/cloud-game /cloud-game # autocertbot (SSL) requires these on the first run COPY --from=build_coordinator /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -FROM ubuntu:plucky AS worker +FROM ubuntu:resolute AS worker RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ curl \ libx11-6 \ libxext6 \ + libx264-165 \ && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* /var/log/* /usr/share/bug /usr/share/doc /usr/share/doc-base \ /usr/share/X11/locale/* diff --git a/pkg/encoder/h264/x264.go b/pkg/encoder/h264/x264.go index 58259ff4..e0ce43ef 100644 --- a/pkg/encoder/h264/x264.go +++ b/pkg/encoder/h264/x264.go @@ -3,7 +3,8 @@ package h264 /* // See: [x264](https://www.videolan.org/developers/x264.html) #cgo !st pkg-config: x264 -#cgo st LDFLAGS: -l:libx264.a +#cgo x264s pkg-config: x264 +#cgo st,!x264s LDFLAGS: -l:libx264.a #include "stdint.h" #include "x264.h"