![]() If you wish, you can restart the container now(as restarting always seems to 'fix' things even if they are working). If the stable doesn't work, install the code-insiders, as it may have fixed some bugs): Sudo add-apt-repository "deb stable main"Īnd now install vscode(I installed code-insiders to be at a more "bleeding-edge" version of vscode, but installing the stable version should work as well. ![]() The only output to confirm everything worked is the word: OK I will reproduce the installation below for convenience.Īdd the Microsoft repo( while in the container): ![]() The vscode website provides an adequate explanation for installing vscode on linux, but I preferred this installation method: How to Install Visual Studio Code on Ubuntu 20.04. You should now be in the container via SSH if successful. Then you will be prompted to enter the password for user ubuntu, enter: 'ubuntu' This key is not known by any other names Are you sure you want to continue connecting ( yes / no / ) ? ED25519 key fingerprint is SHA256 : fXFuBKAXm2HgFGuKVFpu + bRIR / 2 tzxBIWVH + dkQh9KE. The authenticity of host ' ()' can ' t be established. Please look for these lines in the sshd_config file and change them appropriately(some of them also require that the # be removed, otherwise the line remains commented): I used 'ubuntu' for the new password(just to simplify the installation).īefore connecting to the container via SSH, the SSH needs to be configured with the appropriate changes. I found that even though the container ubuntu user seems to have 'ubuntu' as a password, this password didn't work when trying to SSH into the container(from the host). Configuring SSH in the containerįirst we will give the ubuntu user a password. Prior to installing these packages, vscode was not working. I attempted to install the least amount of packages to get vscode running. I am not sure what half of these are for, but the reference for why I needed to install them is here: docker-vscode Dockerfile. 0 - 0 libcanberra - gtk - module software - properties - common gnupg2 1 libgconf - 2 - 4 libnotify4 libnspr4 libnss3 libnss3 - dev libnss3 - tools libxtst - dev libgtk2. Sudo apt - get install libxss1 libxshmfence1 libxext - dev libxrender - dev libxslt1. Install the following( after 'attaching' the container and being in the container shell): For basic programs like xclock, not as many packages were needed, but for vscode, the installation might feel 'bloated'. The container requires a number of packages in order to run a GUI application like vscode. (Note 2: sudo may not be needed for unprivileged containers, so if you don't need it, don't use it) Installing required packages in the container (Note 1: this shell is not the same as an SSH connection, so X11-forwarding won't work via it, as far as I am aware) If you enter as root, use the following to enter as the user: su ubuntu Once it is complete, start the container using:Īnd access a shell of the container using: This process should take a while(depending on internet speed). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |