I wanted to be able to compare gcc/gcc ++, clang/clang ++, vscode/vscode ++ with docker.
2019 and 2020 did not go well. In 2021, I tried calmly and it worked.
Here, write the place to put vscode. Finally, enter the URL of the article with clang. There is a docker formula for gcc.
So, gcc officially put clang and vscode. The problem is that both become one container and the update becomes large-scale.
The description of dockerfile that makes clang and vscode into separate containers is yet to be done.
If you have a good description, I would appreciate it if you could introduce it.
VSCode I tried to install VS Code on ubuntu of docker.
3 ways to install VS Code on Ubuntu https://qiita.com/yoshiyasu1111/items/e21a77ed68b52cb5f7c8
- How to register a Microsoft repository
I worked on plain ubuntu. Until the introduction, nothing seemed to happen.
$ docker run -it gcc /bin/bash
ubuntu
# apt update; apt -y upgrade
# apt install curl wget sudo vim apt-utils apt-transport-https gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils
# sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
# sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
# apt update; apt -y upgrade
# apt install code
#code --version
You are trying to start Visual Studio Code as a super user which isn't recommended. If this was intended, please specify an alternate user data directory using the `--user-data-dir` argument.
# code --version --user-data-dir /home/cpp
1.52.1
ea3859d4ba2f3e577a159bc91e3074c5d85c0523
x64
~~ Now here ~~ Solved.
error while loading shared libraries: libX11-xcb.so.1 (solved) https://qiita.com/kaizen_nagoya/items/bc03d5ec280cb622a2d4
We introduced clang to docker today. (Solution) https://qiita.com/kaizen_nagoya/items/193b044a40e0e6923f83
ver. 0.01 First draft 20210102 ver. 0.02 Solution 20210103
Recommended Posts