scottyhardy / docker-remote-desktop

Docker image for Remote Desktop server with audio support
MIT License
242 stars 123 forks source link

Build fails at step 4 #13

Closed AugustoCiuffoletti closed 2 years ago

AugustoCiuffoletti commented 2 years ago

Describe The Bug The build process does not complete, and fails when it tries to access the /pulseaudio directory.

Here is the response to the build command. A cached result is used, but the same happens when building from scratch:

$ sudo docker build -t docker-remote-desktop .
Sending build context to Docker daemon  3.254MB
Step 1/12 : ARG TAG=rolling
Step 2/12 : FROM ubuntu:$TAG as builder
 ---> 2dc51e04d744
Step 3/12 : RUN sed -i -E 's/^# deb-src /deb-src /g' /etc/apt/sources.list     && 
apt-get update     && DEBIAN_FRONTEND="noninteractive" apt-get install -y -- 
no-install-recommends         build-essential         dpkg-dev         git         libpulse- 
dev         pulseaudio     && apt-get build-dep -y pulseaudio     && apt-get source 
pulseaudio     && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 3116b743e0a6
Step 4/12 : RUN cd /pulseaudio-$(pulseaudio --version | awk '{print $2}')     && 
./configure
---> Running in c301e4493532
/bin/sh: 1: cd: can't cd to /pulseaudio-15.0
The command '/bin/sh -c cd /pulseaudio-$(pulseaudio --version | awk '{print $2}')     
&& ./configure' returned a non-zero code: 2

The docker works properly if pulled and run directly. The build succeeds if the pulseaudio related lines are commented out from the Dockerfile, but, after successful login, the screen remains black.

To Reproduce Steps to reproduce the behavior:

  1. Using Ubuntu 20.04 with docker v20.10.10
  2. git clone https://github.com/scottyhardy/docker-remote-desktop.git
  3. cd docker-remote-desktop/
  4. sudo docker build -t docker-remote-desktop .

Expected behavior Produce a new running image.

Desktop (please complete the following information):

AugustoCiuffoletti commented 2 years ago

I solved the problem with a super-easy fix: at line in 3 in the Dockerfile replace "rolling" with "latest".

Explanation: I tried to execute the offending statements in the Docker and I found that, in the "rolling" revision, the pulseaudio source package has a different structure (no ".configure" script), and that the neutrinolab module is probably buggy (a missing header file, with an apparently not working #ifdef in code). The "latest" ubuntu version, which currently corresponds to "20.04", does not show such problems. It might be wiser to use such tag instead of the "latest".