LoginSignup
2
2

docker(49) vscode on docker 苦行は続く。

Last updated at Posted at 2019-05-05

Cコンパイラ3種をdockerで
https://qiita.com/kaizen_nagoya/items/77184cf005490d7579e6

vscode 苦行は続く

# code a.c
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument.

i can't run as root though i specify an alternate user data directory with the --user-data-dir argument #7243
https://github.com/Microsoft/vscode/issues/7243

--user-data-dir incorrect help #41429
https://github.com/Microsoft/vscode/issues/41429

# code a.c --user-data-dir /root
/usr/share/code/bin/../code: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

“libasound.so.2: cannot open shared object file: No such file or directory”
https://askubuntu.com/questions/482478/libasound-so-2-cannot-open-shared-object-file-no-such-file-or-directory

下記のようにライブラリ1つ追加。

# code --version
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument.
# code a.c --user-data-dir=/root
/usr/share/code/bin/../code: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
# apt search libsound
Sorting... Done
Full Text Search... Done
libsoundio-dbg/stable 1.0.2-1+b1 amd64
  debugging symbols for libsoundio

libsoundio-dev/stable 1.0.2-1+b1 amd64
  cross platform audio input and output library (development files)

libsoundio1/stable 1.0.2-1+b1 amd64
  cross-platform audio input and output library

libsoundtouch-dev/stable 1.9.2-2+deb9u1 amd64
  Development files for the sound stretching library

libsoundtouch-ocaml/stable 0.1.7-1+b4 amd64
  OCaml bindings for the sound stretching library -- runtime files

libsoundtouch-ocaml-dev/stable 0.1.7-1+b4 amd64
  OCaml bindings for the sound stretching library -- runtime files

libsoundtouch1/stable 1.9.2-2+deb9u1 amd64
  Sound stretching library

libsoundtouch1-dbg/stable 1.9.2-2+deb9u1 amd64
  Debugging symbols for the sound stretching library

root@31acc5c44966:/home/root# apt search libsoundio1
Sorting... Done
Full Text Search... Done
libsoundio1/stable 1.0.2-1+b1 amd64
  cross-platform audio input and output library

root@31acc5c44966:/home/root# apt install libsoundio1

苦行は続く。

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
31acc5c44966        kaizenjapan/cc2     "/bin/bash"         13 hours ago        Up 13 hours                             modest_jackson

$ docker commit 31acc5c44966 kaizenjapan/cc3
sha256:a50dc31ad23fcb73105eac6bd30903517905025af7640f02f261589beb30759c

$ docker push kaizenjapan/cc3
The push refers to repository [docker.io/kaizenjapan/cc3]
189133cb5859: Preparing 
03c403a68abc: Preparing 
67479158abb8: Preparing 
abfd81232d1e: Preparing 
eac885ac1d3b: Preparing 
08e7e0bcc587: Waiting 
0fe19df8b8f8: Waiting 
b17cc31e431b: Waiting 
12cb127eee44: Waiting 
604829a174eb: Waiting 
fbb641a8b943: Waiting 
denied: requested access to the resource is denied

cc3ではなくcc4でも同じ。

#参考資料(reference)
docker gcc upgrade error
https://qiita.com/kaizen_nagoya/items/d2d424318b711aef4af5

Couldn't mount the binfmt_misc filesystem
https://qiita.com/kaizen_nagoya/items/da5b0989803b09cac369

docker: error pulling image configuration: Get
https://qiita.com/kaizen_nagoya/items/1350d5a7144706d0bd81

docker rmiのための順番
https://qiita.com/kaizen_nagoya/items/0bc05d08cf18af4a8801

関連資料(related document)

C++はなぜコンパイルが遅いのか
https://qiita.com/Kogia_sima/items/04270c7d99fa3d35d2c8

各フェースごとの要する時間
恥ずかしながら、測っていませんでした。
従来Cで書いていたコードをC++に書き換えたりしているため、コンパイルに時間がかかっても実行時間が短い方が嬉しい。それは最適化の段階だけでなく、その前の段階も含めて、それぞれの設計を

コマンドラインからVS Codeでファイルやフォルダを開く
https://qiita.com/1natsu172/items/b951aa33451dad36bd7c

Visual Studio Code チートシート
https://qiita.com/aoinu/items/681f932ce0b162cd9520

文書履歴(document history)

ver. 0.01 初稿 20190505 午後
ver. 0.02 標題追記 20190505 夕
ver. 0.03 標題追記 20190813

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2