This is a remote VS Code server, that has tools pre-installed, that can assist in the development of Rust and Non-Rust applications. 🦀
- Rust (cargo, rustup, etc)
- Python3 & Pip
- Docker
- Custom shortcuts *
- Optional set of default VS Code extensions *
Custom shortcuts for a combination of common tasks to help the lifecyle of app developement.
A primary case being: wksp -C
; When used, it removes all containers, and images from docker. Helping clear up a workspace mid-project.
The default set of extensions can be installed with: wksp -I
.
Deprecated SSH-Key dump
By default, the container will generate an SSH key pair. When the user session starts, i.e the user signs into the server via SSH or VS Code, the server will copy the private key, into the /keys
directory. If /keys
is bound to the host via -v
. This key can be added to your desktop to allow for seamless signon into the workspace. As of now, the password of the SSH key, is the same one set for the user.
In v1.12.7, an SSH private key is no longer generated and provided by the service. A public key is now provided to the workspace instead.
docker run -itd \
# *Required*
# Port for SSH
-p <hostport>:22 \
# *OPTIONAL*
# SSH Public-key dump location (Recommended)
-v <dir-2-keys>:/keys \
# Workspaces location
-v <dir-2-wksp>:/workspaces \
# Password for remote connection and root user
-e PSWD="<password>" \
# Git config for workspace
# user.name
-e "GIT_USER_NAME"="ferris" \
# user.email
-e "GIT_USER_EMAIL"="[email protected]" \
#
jimurrito/ionupdate_rs:latest
- Install the [Remote Explorer Extension](https://marketplace.visualstudio.com/items?itemName=ms-VS Code-remote.remote-ssh) in VS Code
- Select the Remote Explorer tab on the left-side bar
- Create a new host, using the IP and Port combination chosen for the conatiner
- Connect to the container and enter the password chosen in the docker run command issues. Default:
ferris
Attach a local filesystem to the /keys
volume, to get access to the ~/.ssh
directory for your workspace user. Dropping a public SSH key into this directory will allow you to seamlessly signon with the private key from the pair.
Note:
If there us no pre-existingauthorized_hosts
file within the/keys
or~/.ssh
directory. Runcopy-ssh-id
, with the proper login and path information.This not only copies the SSH private key specified as an argument, but generates theauthorized_hosts
file for you.
- Rust Analyzer
- Docker Tools
- Better TOML
- Markdown Lint
- Shellcheck
- Pylance
- Python-tools
- VS Code Counter
Open the /wksp/root.sh
file via your chosen IDE
nano /wksp/root.sh
or
By using this command built into wksp
wksp -N "<(Opt)IDE>" # Default IDE is nano
Then navigate down to line '45', and create your new commands.
(39) ......
(40) #
(41) # ---------------------------------
(42) # [[[ CUSTOM COMMANDS ]]]
(43) #
(44) # <Command description>
(45) elif [ "$1" = "--<long-arg>" ] || [ "$1" = "-<short-arg>" ]; then
(46) <COMMAND>
(47) #
(48) # ---------------------------------
(50) #
(51) ......
elif [ "$1" = "--<long-arg>" ] || [ "$1" = "-<short-arg>" ]; then
<COMMAND>
- It's recommended to save the Command script to the
/wksp
directory. - Try and follow the cmd template above.
- Recommend to add your new cmd to
/wksp/help.info
- If you create anything cool, please create a pull request. Always looking for more ways to improve the development of most applications. ❤️
If you run into any problems, or just have a question. Please submit an issue @ https://github.com/jimurrito/workspace4rs/issues