title: Cross compiler link in Docker container
body: <p>I have some troubles using a docker container in order to cross compile a program with visual studio 2019.</p>
  <p>Here is my docker file</p>
  <pre><code>FROM ubuntu:16.04
  
  RUN dpkg-divert --local --rename --add /sbin/initctl
  RUN ln -sf /bin/true /sbin/initctl
  ARG DEBIAN_FRONTEND=noninteractive
  
  RUN apt-get update
  RUN apt-get -y upgrade
  
  # install 32 bit libraries required for gnuarm tools from
  # https://launchpad.net/gcc-arm-embedded &amp; a few minimalistic tools with ssh server
  RUN dpkg --add-architecture i386 &amp;&amp; \
      apt-get update &amp;&amp; \
      apt-get -y install \
      libc6:i386 libncurses5:i386 libstdc++6:i386 libpython2.7:i386 vim \
      make git unzip \
      sudo curl less tree openssh-server
  
  # clean cache
  RUN apt-get clean
  
  RUN mkdir -p /var/run/sshd
  
  COPY *.tgz /tmp/
  RUN cd /tmp &amp;&amp; \
      tar zxvf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf_5.3_sub1.0.3.tgz -C /opt &amp;&amp; \
      tar zxvf Compiler_gcc-linaro-5.3_patch_1.2.2.tgz &amp;&amp; \
      cd Compiler_gcc-linaro-5.3_patch &amp;&amp; \
      bash ./install-owa4x-comp-PATCH-1.2.2.sh &amp;&amp; \
      cd / &amp;&amp; \ 
      rm -rf /tmp/*
  ENV PATH=&quot;${PATH}:/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin&quot;
  
  RUN useradd -G sudo --create-home --shell /bin/bash --user-group myuser
  
  RUN echo &quot;myuser:myuser_pwd&quot; | chpasswd
  
  RUN echo &quot;PATH=$PATH:/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linuxgnueabihf/bin&quot; &gt;&gt; /etc/profile
  CMD [&quot;source /etc/profile&quot;]
  
  CMD [&quot;/usr/sbin/sshd&quot;, &quot;-D&quot;]
  EXPOSE 22
  
  ENV WORKSPACE /home/myuser/workspace
  VOLUME ${WORKSPACE}
  </code></pre>
  <p>Here is how a create my image</p>
  <pre><code>docker build --tag cc_arm .
  myuser@ubuntu:~/Documents/share$ docker run -d -p 5000:22 -v /home/myuser/Documents/share:/home/myuser/workspace cc_arm
  </code></pre>
  <p>But when I open a shell and type</p>
  <pre><code>which g++ 
  which gcc 
  </code></pre>
  <p>I have nothing. I've also tried to set the path manually</p>
  <pre><code>export C=&quot;/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc&quot;
  export CXX=&quot;/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++&quot;
  
  echo 'export CC=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc' &gt;&gt; ~/.bashrc
  echo 'export CXX=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++' &gt;&gt; ~/.bashrc
  </code></pre>
  <p>But it doesn't work.</p>
  <p>I think my environnement is okay because I can cross compile a simple programm using a g++ from the packages (locate in /usr/bin/g++)</p>
  <pre><code> sudo apt install -y openssh-server build-essential gdb rsync ninja-build zip
  </code></pre>
  <p>Thanks in advance.</p>