fix some bug

This commit is contained in:
QIDI TECH
2025-02-26 20:25:18 +08:00
parent ffb5d3da8a
commit a19b41c650
17 changed files with 511 additions and 79 deletions

View File

@@ -1,5 +1,4 @@
FROM docker.io/ubuntu:22.04
LABEL maintainer "DeftDawg <DeftDawg@gmail.com>"
FROM docker.io/ubuntu:24.10
# Disable interactive package configuration
RUN apt-get update && \
@@ -14,6 +13,7 @@ RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
xvfb \
eglexternalplatform-dev \
extra-cmake-modules \
file \
@@ -39,7 +39,6 @@ RUN apt-get update && apt-get install -y \
libssl-dev \
libudev-dev \
libwayland-dev \
libwebkit2gtk-4.0-dev \
libxkbcommon-dev \
locales \
locales-all \
@@ -47,6 +46,7 @@ RUN apt-get update && apt-get install -y \
pkgconf \
sudo \
wayland-protocols \
libwebkit2gtk-4.1-dev \
wget
# Change your locale here if you want. See the output
@@ -58,14 +58,52 @@ RUN locale-gen $LC_ALL
# the CA cert path on every startup
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
COPY ./ QIDIStudio
COPY ./ /QIDIStudio
WORKDIR QIDIStudio
RUN chmod +x /QIDIStudio/DockerEntrypoint.sh
# These can run together, but we run them seperate for podman caching
# Update System dependencies
WORKDIR /QIDIStudio
# Ubuntu 24 Docker Image now come with default standard user "ubuntu"
# It might conflict with your mapped user, remove if user ubuntu exist
RUN if id "ubuntu" >/dev/null 2>&1; then userdel -r ubuntu; fi
# Use bash as the shell
# Set ARG values
# If user was passed from build it will create a user same
# as your workstation. Else it will use /root
# Setting ARG at build time is convienient for testing purposes
# otherwise the same commands will be executed at runtime
ARG USER=root
ARG UID=0
ARG GID=0
RUN if [ "$UID" != "0" ]; then \
groupadd -g $GID $USER && \
useradd -u $UID -g $GID -m -d /home/$USER $USER && \
mkdir -p /home/$USER && \
chown -R $UID:$GID /QIDIStudio && \
usermod -aG sudo $USER && \
passwd -d "$USER"; \
else \
mkdir -p /root/.config; \
fi
# Allow password-less sudo for ALL users
RUN echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/999-passwordless
RUN chmod 440 /etc/sudoers.d/999-passwordless
# Update System dependencies(Run before user switch)
RUN ./BuildLinux.sh -u
# Run as the mapped user (or root by default)
USER $USER
# These can run together, but we run them seperate for podman caching
# Build dependencies in ./deps
RUN ./BuildLinux.sh -d
@@ -73,7 +111,7 @@ RUN ./BuildLinux.sh -d
RUN ./BuildLinux.sh -s
# Build AppImage
ENV container podman
ENV container=podman
RUN ./BuildLinux.sh -i
# It's easier to run QIDI Studio as the same username,
@@ -82,13 +120,14 @@ RUN ./BuildLinux.sh -i
# to keep permissions the same. Just in case, defaults
# are root.
SHELL ["/bin/bash", "-l", "-c"]
ARG USER=root
ARG UID=0
ARG GID=0
RUN [[ "$UID" != "0" ]] \
&& groupadd -f -g $GID $USER \
&& useradd -u $UID -g $GID $USER
# Point FFMPEG Library search to the binary built upon QIDIStudio build time
ENV LD_LIBRARY_PATH=/QIDIStudio/build/package/bin
# Using an entrypoint instead of CMD because the binary
# accepts several command line arguments.
ENTRYPOINT ["/QIDIStudio/build/package/bin/qidi-studio"]
# entrypoint script will pass all arguments to QIDI-studio
# after the script finishes
#ENTRYPOINT ["/QIDIStudio/build/package/bin/QIDI-studio"]
ENTRYPOINT ["/QIDIStudio/DockerEntrypoint.sh"]