diff --git a/README.md b/README.md index 6d9ac93..c1fdb15 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ This will run the docker containers: ## Access the Development Container +This project includes a development container to facilitate code development. When the container is built for the first time, it is empty, and the repository needs to be cloned again inside the container to build the project. + ### Using VSCode Install `ms-vscode-remote.remote-ssh` extension on vscode and enter on the container. @@ -53,7 +55,11 @@ First you need to check you IP address. You can do it by running: Once you know your ip address you enter the container by doing: - ssh -p 55555 bisect@{your-ip-address} -XY + ssh -p 55555 nmos@{your-ip-address} -XY + +The password for this user is: + + nmos ## Access NVIDIA NMOS Commissioning Controller Container @@ -81,6 +87,10 @@ If you have not used Conan before: conan profile detect --force +- You can map an outside of the container .conan2 folder in order to have persistent data storage. You just need to add the line below on to the volumes inside the docker-compose-x86-development.yml. + + - /.conan2:/home/nmos/.conan2:rw + ### Install the dependencies using Conan This only has to be done at the first time or after any of the dependencies change: diff --git a/images/dev/Dockerfile b/images/dev/Dockerfile index 7fc13e4..0d4674f 100644 --- a/images/dev/Dockerfile +++ b/images/dev/Dockerfile @@ -11,20 +11,20 @@ ENV SSHD_PORT=55555 ENV DEBIAN_FRONTEND=noninteractive RUN echo "APT::Get::Assume-Yes "true";" > /etc/apt/apt.conf.d/90assumeyes -COPY scripts /opt/bisect/scripts +COPY scripts /opt/nmos/scripts RUN apt-get update -RUN /opt/bisect/scripts/build-tools/add-user-bisect.sh -RUN /opt/bisect/scripts/build-tools/install-fish.sh -RUN /opt/bisect/scripts/build-tools/install-git.sh -RUN /opt/bisect/scripts/build-tools/install-conan.sh -RUN /opt/bisect/scripts/build-tools/install-cmake-x86.sh +RUN /opt/nmos/scripts/build-tools/add-user-nmos.sh +RUN /opt/nmos/scripts/build-tools/install-fish.sh +RUN /opt/nmos/scripts/build-tools/install-git.sh +RUN /opt/nmos/scripts/build-tools/install-conan.sh +RUN /opt/nmos/scripts/build-tools/install-cmake-x86.sh RUN apt-get install -y \ vim clang-format rsync gdb gdbserver x11-apps xauth iproute2 build-essential RUN apt-get install -y libgtk-3-dev ninja-build -RUN /opt/bisect/scripts/common/add-ssh-server.sh +RUN /opt/nmos/scripts/common/add-ssh-server.sh RUN apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \ gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x \ @@ -41,8 +41,8 @@ RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 RUN apt-get autoremove -RUN chmod +x /opt/bisect/scripts/launch.sh +RUN chmod +x /opt/nmos/scripts/launch.sh -WORKDIR /home/bisect -USER bisect -ENTRYPOINT /opt/bisect/scripts/launch.sh +WORKDIR /home/nmos +USER nmos +ENTRYPOINT /opt/nmos/scripts/launch.sh diff --git a/images/docker-compose-x86-development.yml b/images/docker-compose-x86-development.yml index 6243953..f641dee 100755 --- a/images/docker-compose-x86-development.yml +++ b/images/docker-compose-x86-development.yml @@ -10,8 +10,7 @@ services: - PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native volumes: - ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native - - ../volumes/home:/home/bisect/ - - /.conan2:/home/bisect/.conan2:rw + - ../volumes/home:/home/nmos/ nmos-registry: image: docker.io/rhastie/nmos-cpp:latest diff --git a/images/scripts/build-tools/add-user-bisect.sh b/images/scripts/build-tools/add-user-nmos.sh similarity index 59% rename from images/scripts/build-tools/add-user-bisect.sh rename to images/scripts/build-tools/add-user-nmos.sh index 7c25dd4..0cdcaa0 100755 --- a/images/scripts/build-tools/add-user-bisect.sh +++ b/images/scripts/build-tools/add-user-nmos.sh @@ -4,11 +4,11 @@ set -eu export DEBIAN_FRONTEND=noninteractive apt-get install -y sudo --option=Dpkg::Options::=--force-confdef -adduser --disabled-password --gecos '' bisect -adduser bisect sudo -echo 'bisect:bisect' | chpasswd +adduser --disabled-password --gecos '' nmos +adduser nmos sudo +echo 'nmos:nmos' | chpasswd echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # access gst video plugins as non-root -usermod -aG video bisect -usermod -aG audio bisect +usermod -aG video nmos +usermod -aG audio nmos diff --git a/images/scripts/common/add-ssh-server.sh b/images/scripts/common/add-ssh-server.sh index 0f2411e..cc602bf 100755 --- a/images/scripts/common/add-ssh-server.sh +++ b/images/scripts/common/add-ssh-server.sh @@ -19,6 +19,6 @@ echo "X11UseLocalhost no"; echo "Port ${SSHD_PORT}"; echo "PasswordAuthentication yes"; echo "Subsystem sftp /usr/lib/openssh/sftp-server"; -) > /etc/ssh/sshd_config_bisect +) > /etc/ssh/sshd_config_nmos mkdir /run/sshd diff --git a/images/scripts/launch.sh b/images/scripts/launch.sh index b9d74ed..dcc4f33 100755 --- a/images/scripts/launch.sh +++ b/images/scripts/launch.sh @@ -1,16 +1,16 @@ #!/bin/bash set -eu -HOME="/home/bisect" +HOME="/home/nmos" if [ -d $HOME ] then echo "Directory $HOME exists." - sudo chown bisect.bisect $HOME + sudo chown nmos.nmos $HOME else echo "Directory $HOME does not exist." mkdir $HOME fi # start ssh service -sudo /usr/sbin/sshd -D -e -f /etc/ssh/sshd_config_bisect +sudo /usr/sbin/sshd -D -e -f /etc/ssh/sshd_config_nmos