Introduced vscode with apt to docker: ubuntu

Introduction

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

  1. 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

Document history

ver. 0.01 First draft 20210102 ver. 0.02 Solution 20210103

Recommended Posts

Introduced vscode with apt to docker: ubuntu
Setting to exit from Docker container with VScode
Install java with Ubuntu 16.04 based Docker
Build PlantUML environment with VSCode + Docker
Update MySQL from 5.7 to 8.0 with Docker
How to start Camunda with Docker
How to install Adopt OpenJDK on Debian, Ubuntu with apt (-get)
Connect to Amazon EC2 with SSH (Ubuntu)
How to share files with Docker Toolbox
We introduced clang to docker today. (Solution)
How to compile Java with VsCode & Ant
[Rails] How to use rails console with docker
Deploy to heroku with Docker (Rails 6, MySQL)
How to use Docker in VSCode DevContainer
Sample to start Ubuntu with Deployment with client-go
Run Ubuntu + ROS with Docker on Mac
How to run Blazor (C #) with Docker
How to build Rails 6 environment with Docker
Introduced Docker to Windows 10 Home August 2020 version
I tried to verify AdoptOpenJDK 11 (11.0.2) with Docker image
Introduced GROWI to Raspberry Pi 4 Model B (Ubuntu)
How to give your image to someone with docker
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Rip a CD to MP3 with Ubuntu 18.04 LTS
How to use nfs protocol version 2 with ubuntu 18.04
Make Volume faster when using Docker with vscode.
How to use docker compose with NVIDIA Jetson
How to use nginx-ingress-controller with Docker for Mac
Build mecab (NEologd dictionary) environment with Docker (ubuntu)
[Rails] How to build an environment with Docker
Easy to display hello world with Rails + Docker
Burn files to CD / DVD with Ubuntu 18.04 LTS
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
VNC connection to Ubuntu Desktop with Mac screen sharing.
[Introduction to Docker x ECS] ECS deployment with docker compose up
How to build docker environment with Gradle for intelliJ
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
Feel free to try Elasticsearch cluster with WSL2 + Docker
How to delete untagged images in bulk with Docker
[Ubuntu 18.04] Prevent kernel from being updated with apt update
(For myself) Build gitlab with ubuntu18.04 + docker for home (Note)
I introduced Docker to Rails 6, so I summarized it (beginner)
Try connecting to AzureCosmosDB Emulator for Docker with Java
Install rbenv with apt on ubuntu and put ruby
How to make Laravel faster with Docker for Mac
How to use RealSense with ubuntu 20.04 and ROS Noetic
I wanted to develop PHP with vscode remote container
[Docker + Rails] How to deal with Rails server startup failure
Debug the VSCode + Docker + PHP development environment with XDebug.
I want to redirect sound from Ubuntu with xrdp
Ssh connect from container to git with VSCode Remote Container
Create Chisel development environment with Windows10 + WSL2 + VScode + Docker
Launch MariaDB with Docker
Rails deploy with Docker
Run Pico with docker
Explode Docker with WSL2
Use Puphpeteer with Docker
Install Gradle with ubuntu16.04
How to install Docker
Operate Emby with Docker
Try WildFly with Docker