Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devonfw-forge/rd-installer
Supercharged installer of Rancher Desktop as Docker Desktop alternative
https://github.com/devonfw-forge/rd-installer
Last synced: 7 days ago
JSON representation
Supercharged installer of Rancher Desktop as Docker Desktop alternative
- Host: GitHub
- URL: https://github.com/devonfw-forge/rd-installer
- Owner: devonfw-forge
- License: apache-2.0
- Created: 2022-03-25T11:45:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-14T13:38:58.000Z (over 2 years ago)
- Last Synced: 2024-08-01T16:45:40.947Z (3 months ago)
- Language: PowerShell
- Homepage:
- Size: 137 KB
- Stars: 6
- Watchers: 12
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE
Awesome Lists containing this project
README
= Rancher Desktop as Docker Desktop alternative
You are a few steps far from moving away from Docker Desktop to a much more powerful free alternative, which will enable you to introduce Kubernetes in your development environment if desired, or continue working as normal with plain Docker-like containers.
If you are new to containers or you are not already familiar with Docker, we encourage you to take some courses (like https://www.pluralsight.com/courses/getting-started-docker[this one]) or research on the web about Docker, which has been the most spread solution so far for containerization.
== Installation
The script `install.ps1` will install the Rancher Desktop solution along with some extra features:
* Support for usual Docker commands in Powershell and Bash (flag `-Alias`).
* Support for enterprise VPNs (flag `-VPN`).
* Support (additional) for Windows Containers using Docker binary (flag `-WindowsContainers`). You do not need to choose anymore!To install it, clone the repository and run `install.ps1` with the desired flags.
*Tipically, you just need to either*:
```
.\install.ps1 -Alias -VPN -WindowsContainers
```*or right-click on the install script and select "Run with PowerShell"*, it will default to the above flags.
IMPORTANT: You may be asked to reboot your computer. This happens when you do not have the required Windows features already enabled. If so, relaunch installation process after restart.
CAUTION: Do not enable auto-update in Rancher Desktop settings. VPN support is known to break after v1.1.1.
== Usage
Using Linux containers is very simple, just make sure Rancher Desktop is started, that you do not change default containerd runtime, and go ahead running the Docker commands you are used to:
* `docker `
* `docker-compose `For using Windows containers, start the daemon with `dockerw-start`, and perform a minor change in the commands (note the `w`):
* `dockerw `
* `dockerw-compose `=== Tips and tricks
==== Volume binding on docker-composeHost paths should be written in Unix-style (using `/`).
In particular, Windows absolute paths should be converted as follows:
```
volumes:
# Docker Desktop:
# - C:\Users\Joey\Desktop\backend:/var/www/html
# Rancher Desktop:
- /c/Users/Joey/Desktop/backend:/var/www/html
```==== Fix Docker not working when called from other applications (i.e. not using a shell). Universal `docker` command support.
Often seen as error: `image operating system "linux" cannot be used on this platform`.
In some cases, Docker commands are executed by third-party applications that rely on binary paths. Also, there are complex scenarios where the alias set on the shell profiles do not apply and existing `docker` commands fail. To solve that, you can use `-RenameBinaries` flag (instead of `-Alias`) on installation, which provides universal `docker` command support by renaming binaries names.
Please note this has the side effect of requiring you to change existing `docker-compose` commands to `docker compose`.
=== Behind the scenes
Rancher Desktop with containerd offers `nerdctl` as CLI. Although command syntax is the same, this requires a lot of changes on existing scripts and it takes time to get used to new command naming. Also, to run Docker Windows containers you need to specify the context, which is annoying. To solve these issues, when executing the installer with `-Alias` flag, the following alias are set on default PowerShell and Bash profiles:
* `docker` and `docker-compose` to `nerdctl` and `nerdctl compose` for Linux containers.
* `dockerw` and `dockerw-compose` to `docker --context win` and `docker compose --context win` for Windows containers.TIP: Some Windows containers lazy power users may want to keep using `docker` as the default command for them. In such case, do not use `-Alias` installation flag and make `win` context the default one.
== Extra features
Rancher Desktop comes with the option to enable a local Kubernetes cluster you can work with.
This feature comes disabled by default, but you can activate it on Rancher Desktop app > Kubernetes Settings by checking `Enable Kubernetes` box.
== Uninstall
To uninstall Rancher Desktop and all the extra features execute the script `uninstall.ps1`.
The uninstall script will cleanup the environment variables, folders and tools, leaving your computer as clean as it was.