This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CODECOMPOSER: Running Code Composer Studio Theia in Ubuntu 22.04 docker container

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: CCSTUDIO

I would like to containerize Code Composer Studio Theia to distribute the specific version to our colleagues to keep our versions and dev environment the same.

Now I've made a Ubuntu 22.04 image which downloads and installs CCS Theia 1.3.1. However, when i try to run it, i get the following error:

 Heavy check mark Container tools-ccstheia-1  Recreated                                                                                                                                                                             0.1s 
Attaching to ccstheia-1
ccstheia-1  | [7:0408/133011.465333:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ccstheia-1  | Trace/breakpoint trap
ccstheia-1 exited with code 133

Now my question is, this has probably something to do with the way Docker works and creates a Ubuntu image.

So, has someone got this to work? What am I missing.

Running Theia from WSL2 works just fine.

This is my dockerfile:

# Get ubuntu version which is compatible with Code Composer Studio Theia
FROM ubuntu:22.04

# Prevent interactive prompts during installations
ENV DEBIAN_FRONTEND=noninteractive

# Update package cache, install tools and dependencies
RUN apt-get update && apt-get install -y wget unzip \
libpython2.7 libtinfo5 libusb-0.1-4 libusb-1.0-0-dev libgconf-2-4 libasound2 libatk1.0-0 libcairo2 \
libgtk-3-0 libxi6 libxtst6 libcanberra-gtk-module binutils libc6-i386 libnss3 libdrm2 libgbm1

# Set working directory to download CCS to
WORKDIR /usr/workdir/downloads

# Download CCS Theia to new downloads folder (made using WORKDIR above)
# Note: this downloads version 1.3.1 of CCS Theia

# Unzip and remove zip in quiet mode, change to the unzipped working directory
RUN unzip -q CCSTheia1.3.1.00004_linux-x64.zip && rm CCSTheia1.3.1.00004_linux-x64.zip

# Change workdir to excecute commands from using RUN
WORKDIR /usr/workdir/downloads/CCSTheia1.3.1.00004_linux-x64

# Make the run file excecutable
RUN chmod +x ccs_theia_setup_1.3.1.00004.run

# Install CCS Theia and change WORKDIR to install directory
RUN ./ccs_theia_setup_1.3.1.00004.run --mode unattended --unattendedmodeui minimal --enable-components PF_C28 --prefix /usr/workdir/application/ccstheia131
WORKDIR /usr/workdir/application/ccstheia131/ccs

# Run CCS Theia!
CMD ./theia/ccstudio --no-sandbox
 
  • Hello,

    Please note that running CCS inside a docker image is not an officially supported environment. With that said, maybe have gotten this to successfully work.

    I don't have much experience myself with docker images but I will see if I can find others who do and can provide some insight on this.

    Thanks

    ki

  • Hi Ki,

    Ok that's fine by me. Is there some other supported environment which has the ability to be run in a container or some other isolated environment? I'm currently working with one other colleague on a project. In the future, we could get more people on the project. It is therefore good practice to keep the dev environment the same across all workstations.

    Thanks for getting back to me.

  • Is there some other supported environment which has the ability to be run in a container or some other isolated environment?

    Many people use virtual machines (the engineering team here also use them). However, I do know that Docker environments are pretty popular and people have successfully used them with CCS Eclipse. However, I'm not sure if people have tried with CCS Theia. I am looking for this information.

  • I can confirm that CCS Eclipse works just fine. I changed the same Dockerfile to download and install CCS Eclipse and running it worked fine. CCS Theia keeps screaming about not being able to communicate with the dbus (desktop-bus). Which is logical, since default Ubuntu containers don't come with a dbus. However, when you enable the dbus and start the daemon, the CCS Theia launcher just stops and signals a Trace/Breakpoint halt. The Trace/Breakpoint halt also seems to have something to do with the Theia application itself.

    My expertise on this topics stops right about there, so someone who's more knowledgeable about low level container drivers might get it to work. For now, i'll just use CCS Eclipse.

  • Thank you for the update. Yes, there have been many people who have tried getting this working with CCS Eclipse. We will need to investigate any limitation with CCS Theia.