Comments (3)
RE: preconfiguring the container for VS Code extensions and settings
When you are asked by VS Code if you want to install an extension in a container, it doesn't change the container, it just adding a file to the host OS for that container.
So in /Users/richard/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/imageConfigs there is a file called my workshop.json which contains everything "installed" to the container
{
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.vscode-jupyter-slideshow"
],
"workspaceFolder": "/",
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
So there is nothing I can put in the container that will install VS Code extensions.
There may be something I can do with DevContainers which is a Microsoft super specification for DockerFiles. Looking into it.
from cogent3workshop.
ZSH is installed in the container and set as the default shell as follows;
# Install Oh My Zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Set zsh as the default shell
SHELL ["/usr/bin/zsh", "-c"]
# Create a default .zshrc file with some suggested configurations
RUN echo 'export ZSH="$HOME/.oh-my-zsh"' >> $HOME/.zshrc && \
echo 'ZSH_THEME="robbyrussell"' >> $HOME/.zshrc && \
echo 'plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump)' >> $HOME/.zshrc && \
echo 'source $ZSH/oh-my-zsh.sh' >> $HOME/.zshrc && \
echo 'export HISTFILE=~/.zsh_history' >> $HOME/.zshrc && \
echo 'export HISTSIZE=10000' >> $HOME/.zshrc && \
echo 'export SAVEHIST=10000' >> $HOME/.zshrc && \
echo 'setopt appendhistory' >> $HOME/.zshrc && \
echo 'setopt histignorespace' >> $HOME/.zshrc && \
echo 'setopt histignorealldups' >> $HOME/.zshrc && \
echo 'source /c3workshop/bin/activate' >> $HOME/.zshrc
# Install zsh-autosuggestions and zsh-syntax-highlighting plugins
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
So running the container with the run command "/usr/bin/zsh" instead of "bin/bash" should work
I've changed the terminal mode wiki page to reflect that
https://github.com/cogent3/Cogent3Workshop/wiki/terminal-mode
VS needs to be prepopulated with "terminal.integrated.defaultProfile.linux": "zsh" to be the default shell in it's terminal. Working on that
from cogent3workshop.
I was mistaken about the vscode-server/extensions. prepopulating with a 45MB extra payload and hard coding the extensions that exist today is a hack but it works.
I have a simpler solution (in branch https://github.com/cogent3/Cogent3Workshop/blob/code-server/ ) by installing code-server (the open source VS code on a browser project) into the container which can populate the extensions by name - downloading the latest automatically upon first time use of the container.
Working on a branch using devcontainer (https://github.com/cogent3/Cogent3Workshop/tree/devcontainer) that appears to be the preferred Microsoft solution for using containers in vs code. All extensions and vs code setting are predefined in the devcontainer file independently of the DockerFile and VS code manages teh building and running of the container ... so it will need almost no command line work. Just point and click in VS code to build a container, run it and work with it
from cogent3workshop.
Related Issues (20)
- LO - 2 - explore the ncbi command line tools HOT 12
- LO - 3 - Identifying and dealing with data issues HOT 8
- LO - 3 - Alignments HOT 2
- LO - 3 - Unsolved / Important problems HOT 1
- Test docker documentation and container HOT 15
- c3 stickers HOT 9
- backref from colima HOT 1
- Verify docker is working HOT 1
- Rework the docker video HOT 1
- Add docker desktop for linux to wiki docs
- LO - 4 - getting data related to a publication HOT 2
- Use a non elevated user for the container
- LO - 3 - From orthologs to alignment HOT 5
- Test of using devcontainers HOT 2
- wiki item for loading a file into your container
- LO - 2 - Getting Data HOT 8
- Installing the cogent3 workshop environment on a Mac HOT 6
- data links for LO - 3 HOT 4
- update workshop objectives HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cogent3workshop.