https://github.com/hugojosefson/docker-webstorm
Runs Jetbrains WebStorm, in as much isolation, or as little, as you wish.
https://github.com/hugojosefson/docker-webstorm
docker docker-image hacktoberfest webstorm
Last synced: about 2 months ago
JSON representation
Runs Jetbrains WebStorm, in as much isolation, or as little, as you wish.
- Host: GitHub
- URL: https://github.com/hugojosefson/docker-webstorm
- Owner: hugojosefson
- Created: 2019-01-03T12:19:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-12T21:42:29.000Z (almost 4 years ago)
- Last Synced: 2025-01-31T17:48:18.358Z (over 1 year ago)
- Topics: docker, docker-image, hacktoberfest, webstorm
- Language: Shell
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker image hugojosefson/webstorm
Runs Jetbrains WebStorm, in as much isolation, or as little, as you wish.
## Usage
This docker image must be started as `root`, so don't use
`docker run --user=...`. Instead, pass environment variables `USER_NAME`,
`USER_ID`, `GROUP_NAME`, `GROUP_ID` (and optionally `HOME`) for the user you
want to become.
Example which runs gives WebStorm access to the current directory, but not your
actual `HOME` on your host.
```bash
# Create a new temp directory to hold the user HOME inside the container
WEBSTORM_HOME=$(mktemp -d) # (or use another specific directory)
# Run WebStorm using in the current directory, as yourself, with config
# saved in the new HOME
docker run --rm -it \
--env USER_ID="$(id -u)" \
--env USER_NAME="$(id -un)" \
--env GROUP_ID="$(id -g)" \
--env GROUP_NAME="$(id -gn)" \
--env HOME="${HOME}" \
--volume "${WEBSTORM_HOME}":"${HOME}" \
--env WEBIDE_VM_OPTIONS="-Duser.home=${HOME}" \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--env DISPLAY="unix${DISPLAY}" \
--volume "$(pwd)":"$(pwd)" \
--workdir "$(pwd)" \
hugojosefson/webstorm webstorm "$(pwd)"
```
### Install Rust
To install Rust inside `WEBSTORM_HOME`:
```bash
docker run --rm -it \
--env USER_ID="$(id -u)" \
--env USER_NAME="$(id -un)" \
--env GROUP_ID="$(id -g)" \
--env GROUP_NAME="$(id -gn)" \
--env HOME="${HOME}" \
--volume "${WEBSTORM_HOME}":"${HOME}" \
--env WEBIDE_VM_OPTIONS="-Duser.home=${HOME}" \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--env DISPLAY="unix${DISPLAY}" \
--volume "$(pwd)":"$(pwd)" \
--workdir "$(pwd)" \
hugojosefson/webstorm webstorm-install-rust
```
Then next time you start webstorm, with the command above, using the same
`WEBSTORM_HOME`, you can then install and use the Rust plugin from Jetbrains.
## License
MIT