I’m using docker-jitsi-meet on ubuntu 22.04. However when I attempt to build the docker image of the web version of jitsi, getting the following error :
Building myapp_webserver
Step 1/15 : ARG JITSI_REPO=jitsi
Step 2/15 : ARG BASE_TAG=stable
Step 3/15 : FROM ${JITSI_REPO}/base:${BASE_TAG}
---> 319b2e366502
Step 4/15 : LABEL org.opencontainers.image.title="Jitsi Meet"
---> Using cache
---> c5cc34716be6
Step 5/15 : LABEL org.opencontainers.image.description="WebRTC compatible JavaScript application that uses Jitsi Videobridge to provide high quality, scalable video conferences."
---> Using cache
---> 298eae2d1ff6
Step 6/15 : LABEL org.opencontainers.image.url="https://jitsi.org/jitsi-meet/"
---> Using cache
---> dfebe0d4db74
Step 7/15 : LABEL org.opencontainers.image.source="https://github.com/jitsi/docker-jitsi-meet"
---> Using cache
---> 20b854afd9af
Step 8/15 : LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/"
---> Using cache
---> 0c82729c172f
Step 9/15 : ADD https://raw.githubusercontent.com/acmesh-official/acme.sh/2.8.8/acme.sh /opt
---> Using cache
---> 494ef2963655
Step 10/15 : COPY rootfs/ /
---> Using cache
---> 06c78e7406c2
Step 11/15 : RUN apt-dpkg-wrap apt-get update && apt-dpkg-wrap apt-get install -y cron nginx-extras jitsi-meet-web socat curl jq && mv /usr/share/jitsi-meet/interface_config.js /defaults && rm -f /etc/nginx/conf.d/default.conf && apt-cleanup
---> Running in 9b3e147c12de
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://ftp.debian.org/debian bullseye-backports InRelease
Temporary failure resolving 'ftp.debian.org'
Err:3 https://download.jitsi.org stable/ InRelease
Temporary failure resolving 'download.jitsi.org'
Err:4 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Err:5 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/bullseye-backports/InRelease Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch https://download.jitsi.org/stable/InRelease Temporary failure resolving 'download.jitsi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package cron
E: Unable to locate package nginx-extras
E: Unable to locate package jitsi-meet-web
E: Unable to locate package socat
E: Unable to locate package curl
E: Unable to locate package jq
ERROR: Service 'myapp_webserver' failed to build: The command '/bin/sh -c apt-dpkg-wrap apt-get update && apt-dpkg-wrap apt-get install -y cron nginx-extras jitsi-meet-web socat curl jq && mv /usr/share/jitsi-meet/interface_config.js /defaults && rm -f /etc/nginx/conf.d/default.conf && apt-cleanup' returned a non-zero code: 100```
My Docker file :
ARG JITSI_REPO=jitsi
ARG BASE_TAG=stable
FROM ${JITSI_REPO}/base:${BASE_TAG}
LABEL org.opencontainers.image.title="Jitsi Meet"
LABEL org.opencontainers.image.description="WebRTC compatible JavaScript application that uses Jitsi Videobridge to provide high quality, scalable video conferences."
LABEL org.opencontainers.image.url="https://jitsi.org/jitsi-meet/"
LABEL org.opencontainers.image.source="https://github.com/jitsi/docker-jitsi-meet"
LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/"
ADD https://raw.githubusercontent.com/acmesh-official/acme.sh/2.8.8/acme.sh /opt
COPY rootfs/ /
RUN apt-dpkg-wrap apt-get update &&
apt-dpkg-wrap apt-get install -y cron nginx-extras jitsi-meet-web socat curl jq &&
mv /usr/share/jitsi-meet/interface_config.js /defaults &&
rm -f /etc/nginx/conf.d/default.conf &&
apt-cleanup
COPY myapp_web/ /usr/share/jitsi-meet/
COPY myapp_web/interface_config.js /defaults/interface_config.js
EXPOSE 80 443
VOLUME ["/config", "/usr/share/jitsi-meet/transcripts"]
My docker-compose.yml(pasting only the relevant code)
services:
# Frontend
myapp_webserver:
container_name: myapp_webserver
#image: jitsi/web:${JITSI_IMAGE_VERSION:-stable}
build:
dockerfile: Dockerfile
context: ./web
restart: ${RESTART_POLICY:-unless-stopped}
ports:
- '${HTTP_PORT}:80'
- '${HTTPS_PORT}:443'
volumes:
- ${CONFIG}/web:/config:Z
- ${CONFIG}/web/crontabs:/var/spool/cron/crontabs:Z
- ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z
environment:
- AMPLITUDE_ID
- ANALYTICS_SCRIPT_URLS
- ANALYTICS_WHITELISTED_EVENTS
- AUDIO_QUALITY_OPUS_BITRATE
- AUTO_CAPTION_ON_RECORD
- BRANDING_DATA_URL
- CALLSTATS_CUSTOM_SCRIPT_URL
- CALLSTATS_ID
- CALLSTATS_SECRET
- CHROME_EXTENSION_BANNER_JSON
- CONFCODE_URL
- CONFIG_EXTERNAL_CONNECT
- DEFAULT_LANGUAGE
- DEPLOYMENTINFO_ENVIRONMENT
- DEPLOYMENTINFO_ENVIRONMENT_TYPE
- DEPLOYMENTINFO_REGION
- DEPLOYMENTINFO_SHARD
- DEPLOYMENTINFO_USERREGION
- DESKTOP_SHARING_FRAMERATE_MIN
- DESKTOP_SHARING_FRAMERATE_MAX
- DIALIN_NUMBERS_URL
- DIALOUT_AUTH_URL
- DIALOUT_CODES_URL
- DISABLE_AUDIO_LEVELS
- DISABLE_DEEP_LINKING
- DISABLE_GRANT_MODERATOR
- DISABLE_HTTPS
- DISABLE_KICKOUT
- DISABLE_LOCAL_RECORDING
- DISABLE_POLLS
- DISABLE_PRIVATE_CHAT
- DISABLE_PROFILE
- DISABLE_REACTIONS
- DISABLE_REMOTE_VIDEO_MENU
- DISABLE_START_FOR_ALL
- DROPBOX_APPKEY
- DROPBOX_REDIRECT_URI
- DYNAMIC_BRANDING_URL
- ENABLE_AUDIO_PROCESSING
- ENABLE_AUTH
- ENABLE_BREAKOUT_ROOMS
- ENABLE_CALENDAR
- ENABLE_COLIBRI_WEBSOCKET
- ENABLE_E2EPING
- ENABLE_FILE_RECORDING_SHARING
- ENABLE_GUESTS
- ENABLE_HSTS
- ENABLE_HTTP_REDIRECT
- ENABLE_IPV6
- ENABLE_LETSENCRYPT
- ENABLE_LIPSYNC
- ENABLE_NO_AUDIO_DETECTION
- ENABLE_NOISY_MIC_DETECTION
- ENABLE_OCTO
- ENABLE_OPUS_RED
- ENABLE_PREJOIN_PAGE
- ENABLE_P2P
- ENABLE_WELCOME_PAGE
- ENABLE_CLOSE_PAGE
- ENABLE_LIVESTREAMING
- ENABLE_LOCAL_RECORDING_NOTIFY_ALL_PARTICIPANT
- ENABLE_LOCAL_RECORDING_SELF_START
- ENABLE_RECORDING
- ENABLE_REMB
- ENABLE_REQUIRE_DISPLAY_NAME
- ENABLE_SERVICE_RECORDING
- ENABLE_SIMULCAST
- ENABLE_STATS_ID
- ENABLE_STEREO
- ENABLE_SUBDOMAINS
- ENABLE_TALK_WHILE_MUTED
- ENABLE_TCC
- ENABLE_TRANSCRIPTIONS
- ENABLE_XMPP_WEBSOCKET
- ENABLE_JAAS_COMPONENTS
- ETHERPAD_PUBLIC_URL
- ETHERPAD_URL_BASE
- E2EPING_NUM_REQUESTS
- E2EPING_MAX_CONFERENCE_SIZE
- E2EPING_MAX_MESSAGE_PER_SECOND
- GOOGLE_ANALYTICS_ID
- GOOGLE_API_APP_CLIENT_ID
- HIDE_PREMEETING_BUTTONS
- HIDE_PREJOIN_DISPLAY_NAME
- HIDE_PREJOIN_EXTRA_BUTTONS
- INVITE_SERVICE_URL
- LETSENCRYPT_DOMAIN
- LETSENCRYPT_EMAIL
- LETSENCRYPT_USE_STAGING
- MATOMO_ENDPOINT
- MATOMO_SITE_ID
- MICROSOFT_API_APP_CLIENT_ID
- NGINX_RESOLVER
- NGINX_WORKER_PROCESSES
- NGINX_WORKER_CONNECTIONS
- PEOPLE_SEARCH_URL
- PREFERRED_LANGUAGE
- PUBLIC_URL
- P2P_PREFERRED_CODEC
- RESOLUTION
- RESOLUTION_MIN
- RESOLUTION_WIDTH
- RESOLUTION_WIDTH_MIN
- START_AUDIO_MUTED
- START_AUDIO_ONLY
- START_BITRATE
- START_SILENT
- START_WITH_AUDIO_MUTED
- START_VIDEO_MUTED
- START_WITH_VIDEO_MUTED
- TESTING_CAP_SCREENSHARE_BITRATE
- TESTING_OCTO_PROBABILITY
- TOKEN_AUTH_URL
- TOOLBAR_BUTTONS
- TRANSLATION_LANGUAGES
- TRANSLATION_LANGUAGES_HEAD
- TZ
- USE_APP_LANGUAGE
- VIDEOQUALITY_BITRATE_H264_LOW
- VIDEOQUALITY_BITRATE_H264_STANDARD
- VIDEOQUALITY_BITRATE_H264_HIGH
- VIDEOQUALITY_BITRATE_VP8_LOW
- VIDEOQUALITY_BITRATE_VP8_STANDARD
- VIDEOQUALITY_BITRATE_VP8_HIGH
- VIDEOQUALITY_BITRATE_VP9_LOW
- VIDEOQUALITY_BITRATE_VP9_STANDARD
- VIDEOQUALITY_BITRATE_VP9_HIGH
- VIDEOQUALITY_ENFORCE_PREFERRED_CODEC
- VIDEOQUALITY_PREFERRED_CODEC
- XMPP_AUTH_DOMAIN
- XMPP_BOSH_URL_BASE
- XMPP_DOMAIN
- XMPP_GUEST_DOMAIN
- XMPP_MUC_DOMAIN
- XMPP_RECORDER_DOMAIN
- XMPP_PORT
- WHITEBOARD_ENABLED
- WHITEBOARD_COLLAB_SERVER_PUBLIC_URL
networks:
meet.jitsi:
# Custom network so all services can communicate using a FQDN
networks:
meet.jitsi:
The reason I’m using the provided docker file for building a new image is for UI customization. As you can see, I have commented out the image part in docker-compose of myapp_webserver and provided context to use the dockerFile.
I can’t seem the understand where the issue is. Help needed.
EDIT: I switched to Linux/Debian bullseye from Ubuntu 22.04 to check whether it is an OS issue.The problem still persists even on Linux. This means either I’m missing something on both Linux and Ubuntu OR it is not a problem of OS but
- the apt-dpkg repository or docker itself.
EDIT :
After debugging for days, I figured the following: The culprit file is this one : 10-config inside rootfs/etc/cont-init.d/10-config
(https://github.com/jitsi/docker-jitsi-meet/tree/master/web/rootfs/etc/cont-init.d)
This is the file that was causing build issues. Once I deleted the file the build completed and containers spawned ,of course with an error that it couldn’t find the 10-config file. I can’t seem to figure out the reason why it’s causing issues since I do not know how it was built. Need some assistance.
This is the file itself. All I know is it is a script that attempts to read from etc/resolv/conf.
Here is the file itself:
#!/usr/bin/with-contenv bash
# make our folders
mkdir -p
/config/{nginx/site-confs,keys}
/run
/var/lib/nginx/tmp/client_body
/var/tmp/nginx
# generate keys (maybe)
if [[ $DISABLE_HTTPS -ne 1 ]]; then
if [[ $ENABLE_LETSENCRYPT -eq 1 ]]; then
mkdir -p /config/acme.sh
pushd /opt
sh ./acme.sh --install --home /config/acme.sh --accountemail $LETSENCRYPT_EMAIL
popd
STAGING=""
if [[ $LETSENCRYPT_USE_STAGING -eq 1 ]]; then
STAGING="--staging"
fi
export LE_WORKING_DIR="/config/acme.sh"
# TODO: move away from standalone mode to webroot mode.
/config/acme.sh/acme.sh
$STAGING
--issue
--standalone
--pre-hook "if [[ -d /var/run/s6/services/nginx ]]; then s6-svc -d /var/run/s6/services/nginx; fi"
--post-hook "if [[ -d /var/run/s6/services/nginx ]]; then s6-svc -u /var/run/s6/services/nginx; fi"
-d $LETSENCRYPT_DOMAIN
rc=$?
if [[ $rc -eq 1 ]]; then
echo "Failed to obtain a certificate from the Let's Encrypt CA."
# this tries to get the user's attention and to spare the
# authority's rate limit:
sleep 15
echo "Exiting."
exit 1
fi
if [[ $rc -eq 0 ]]; then
mkdir -p /config/acme-certs/$LETSENCRYPT_DOMAIN
if ! /config/acme.sh/acme.sh
--install-cert -d $LETSENCRYPT_DOMAIN
--key-file /config/acme-certs/$LETSENCRYPT_DOMAIN/key.pem
--fullchain-file /config/acme-certs/$LETSENCRYPT_DOMAIN/fullchain.pem ; then
echo "Failed to install certificate."
# this tries to get the user's attention and to spare the
# authority's rate limit:
sleep 15
echo "Exiting."
exit 1
fi
fi
else
# use self-signed certs
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
echo "using keys found in /config/keys"
else
echo "generating self-signed keys in /config/keys, you can replace these with your own keys if required"
SUBJECT="/C=US/ST=TX/L=Austin/O=jitsi.org/OU=Jitsi Server/CN=*"
openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT"
fi
fi
fi
# Detect nameserver for Nginx, if not specified.
if [[ -z "$NGINX_RESOLVER" ]]; then
IP_LIST=""
# Parse IPs in /etc/resolv.conf, taking into account IPv6 addresses need to be
# enclosed in square brackets for the Nginx config file.
while read -r line; do
if [[ $line =~ ^nameserver.* ]]; then
IP=$(echo $line | cut -d" " -f2)
COLONS=$(echo $IP | tr -dc ":" | awk '{ print length '})
if [[ $COLONS -ge 2 ]]; then
IP="[$IP]"
fi
if [[ ! "$IP_LIST" = "" ]]; then
IP_LIST+=" "
fi
IP_LIST+="$IP"
fi
done < <(cat /etc/resolv.conf)
export NGINX_RESOLVER=$IP_LIST
fi
echo "Using Nginx resolver: =$NGINX_RESOLVER="
# copy config files
tpl /defaults/nginx.conf > /config/nginx/nginx.conf
tpl /defaults/meet.conf > /config/nginx/meet.conf
if [[ -f /config/nginx/custom-meet.conf ]]; then
cat /config/nginx/custom-meet.conf >> /config/nginx/meet.conf
fi
tpl /defaults/ssl.conf > /config/nginx/ssl.conf
tpl /defaults/default > /config/nginx/site-confs/default
tpl /defaults/system-config.js > /config/config.js
tpl /defaults/settings-config.js >> /config/config.js
if [[ -f /config/custom-config.js ]]; then
cat /config/custom-config.js >> /config/config.js
fi
cp /defaults/interface_config.js /config/interface_config.js
if [[ -f /config/custom-interface_config.js ]]; then
cat /config/custom-interface_config.js >> /config/interface_config.js
fi
EDIT: I ran the script manually to check what is causing the issue. Here is the log :
mkdir: cannot create directory ‘/config’: Permission denied
mkdir: cannot create directory ‘/config’: Permission denied
mkdir: cannot create directory ‘/var/lib/nginx/tmp’: Permission denied
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
......................................................................+++++
................................................+++++
writing new private key to '/config/keys/cert.key'
req: Can't open "/config/keys/cert.key" for writing, No such file or directory
Using Nginx resolver: =127.0.0.53=
10-config: line 92: /config/nginx/nginx.conf: No such file or directory
10-config: line 94: /config/nginx/meet.conf: No such file or directory
10-config: line 99: /config/nginx/ssl.conf: No such file or directory
10-config: line 101: /config/nginx/site-confs/default: No such file or directory
10-config: line 103: /config/config.js: No such file or directory
10-config: line 104: /config/config.js: No such file or directory
cp: cannot stat '/defaults/interface_config.js': No such file or directory
4
Answers
Problem solved. In the instructions, it was mentioned “DO NOT CLONE” but download the repo. It now works. Never knew cloning a build rather than downloading the stable release would break things.
https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/
I would like to thank everyone your time and help all his while.
There’s a couple of things you can do to debug the issue.
While logged into the container as root: (
docker exec -it --user root <containerID> bash
)cat /etc/resolv.conf
??)dig
command (dig @DNS-server-IP deb.debian.org
)/etc/hosts
file, and enterdeb.debian.org
andftp.debian.org
IP addresses inside – that way your container should have no problems "resolving" the IP. After that, run apt-get commands again.Now, I know this isn’t an answer on how to solve the issue, but it could help debug the issue itself.
Try these:
systemctl restart docker.service
Edit or create:
/etc/docker/daemon.json
systemctl restart docker.service
Try setting you network to host:
docker build --network host
Try adding
RUN chmod o+r /etc/resolv.conf
to your dockerfile.Try adding
RUN echo -e "nameserver 8.8.8.8nnameserver 8.8.4.4" >> /etc/resolv.conf
andRUN apt-get update
to your dockerfile.Check if ip forwarding is enabled in your hosts
/etc/sysctl.conf
:net.ipv4.ip_forward = 1
Try setfacl:
setfacl -R -d -m o::rx /var/lib/docker
mentioned here.Configure DNS for all containers, or add the following to the /etc/docker/daemon.json file to set it up.
This way the container DNS is automatically configured to 114.114.114.114 and 8.8.8.8 each time it is started. Use the following command to prove that it has taken effect.