g++/gcc/make not found in remote docker



I've run into a problem where I cannot get a docker toolchain to find gcc/g++/make when deployed on a remote machine but it works when the the docker is local. To simplify the debug, I proceeded with a simple docker:

FROM ubuntu:18.04
RUN apt-get update \
  && apt-get install -y ssh \
    build-essential \
    gcc \
    g++ \
    gdb \
    clang \
    cmake \
    rsync \
    tar \
    python \
  && apt-get clean
RUN useradd -m user && yes password | passwd user


docker build -t clion/remote-cpp-env:0.5 -f Dockerfile.remote-cpp-env .



local machine: cmake/make/gcc/g++/debugger are all found (ssh into local machine for docker connection)

ubuntu1 remote machine: cmake/debugger are found -- make/gcc/g++ not found (ssh into remote machine for docker connection)

ubuntu1 remote machine with defined paths: cmake/debugger are found -- CMake run test fails (ssh into remote machine for docker connection)

Double check of locations:

I don't understand how it finds cmake but not the others. I'm thinking this has something to do with user permissions? Any ideas?



Comment actions Permalink


Is the DockerUbuntu1 container located on the remote machine (not on the one where CLion is installed)?

Comment actions Permalink

Hi Anna,

Yes that is correct. "DockerUbuntu1" container is on a remote machine. CLion and "Docker" container are both on the local machine. Both connections for "Docker" and "Docker2" servers are made via ssh to have the same format.


Comment actions Permalink

In case of the Docker toolchain only local containers (the first option on the list, "Docker for ***") are supported at the moment. Other options, including the SSH option, are not supported in CLion currently - https://youtrack.jetbrains.com/issue/CPP-27398.

If you need to work with the remote Docker container, you can try using the full remote mode (the "Remote Host" toolchain) - https://www.jetbrains.com/help/clion/remote-projects-support.html, instead of the Docker toolchain.

Comment actions Permalink

Hi Anna,

Okay thanks. I'll open up a new ticket then for the remote host toolchain problem I have.



Please sign in to leave a comment.