Utiliser le shell intégré de docker avec cygwin [docker exec -it bash]

Utiliser le shell intégré de docker avec cygwin

environnement

Aperçu

Cela n'a pas fonctionné tel quel, alors j'ai décidé de le laisser sous forme de mémorandum.

$ apt-cyg install gcc-g++
Cache directory is /packages
Mirror is http://mirrors.kernel.org/sourceware/cygwin
--2020-09-10 17:31:34--  https://cygwin.com/key/pubring.asc
cygwin.com (cygwin.com)Demande au DNS... 8.43.85.97
cygwin.com (cygwin.com)|8.43.85.97|:Connexion au 443...Lié.
Envoyé une demande de connexion via HTTP, en attente d'une réponse... 200 OK
longueur: 3049 (3.0K) [text/plain]
`/tmp/tmp.2B5Pa48nYk'Enregistrer dans

/tmp/tmp.2B5Pa48nYk                               100%[=============================================================================================================>]   2.98K  --.-KB/s temps 0s

2020-09-10 17:31:35 (12.5 MB/s) - `/tmp/tmp.2B5Pa48nYk'Enregistrer dans[3049/3049]

TRUSTEDKEY_CYGWIN: FAILED: Hash does not match https://cygwin.com/key/pubring.asc.
Error: TRUSTEDKEY_CYGWIN has been updated, maybe. But sometimes it may has been cracked. Be careful !!!
at : /usr/local/bin/apt-cyg: fetch_trustedkeys: 745

$ docker exec -it busy_williamson bash
the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'

Mise à jour d'apt-cyg

--télécharger apt-cyg

$ cd /usr/local/bin
$ wget https://raw.githubusercontent.com/kou1okada/apt-cyg/master/apt-cyg
--2020-09-10 17:39:36--  https://raw.githubusercontent.com/kou1okada/apt-cyg/master/apt-cyg
raw.githubusercontent.com (raw.githubusercontent.com)Demande au DNS... 151.101.108.133
raw.githubusercontent.com (raw.githubusercontent.com)|151.101.108.133|:Connexion au 443...Lié.
Envoyé une demande de connexion via HTTP, en attente d'une réponse... 200 OK
longueur: 68542 (67K) [text/plain]
`apt-cyg.1'Enregistrer dans

apt-cyg.1                                         100%[=============================================================================================================>]  66.94K  --.-KB/s temps 0.03s

2020-09-10 17:39:48 (2.40 MB/s) - `apt-cyg.1'Enregistrer dans[68542/68542]

--Remplacement d'apt-cyg

rm apt-cyg
mv apt-cyg.1 apt-cyg
chmod +x apt-cyg

Installez winpty

--Installez gcc-g ++, mingw64-x86_64-gcc-g ++

$ apt-cyg install gcc-g++
$ apt-cyg install mingw64-x86_64-gcc-g++

--Installez winpty

$mkdir winpty (Veuillez préparer le répertoire de téléchargement comme il convient)
$ cd winpty

$ wget https://github.com/rprichard/winpty/archive/master.zip
$ unzip master.zip

$ cd winpty-master/
$ ./configure
$ make
$ make install

docker exec -it bash --Utiliser la console de conteneur

winpty docker exec -it busy_williamson bash

Je vous remercie pour votre travail acharné!

Recommended Posts

Utiliser le shell intégré de docker avec cygwin [docker exec -it bash]
Utiliser Puphpeteer avec Docker
Utiliser GDAL avec Python avec Docker
Utilisez SDKMAN! Avec Git Bash
[Docker] À utiliser à tout moment avec Docker + Rails
Vous devez utiliser winpty avec docker exec [Windows]
Utiliser java avec MSYS et Cygwin
Utilisation de cuda11.0 avec pytorch en utilisant Docker
Utiliser le lien symbolique avec la construction en plusieurs étapes de Docker