-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker: updated documentation and added SSH version.
- Loading branch information
Showing
7 changed files
with
58 additions
and
99 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# CARiSMA in a docker container | ||
|
||
There are two ways to run CARiSMA in a docker container: | ||
|
||
* [local](local/): a docker file and instructions for how to run CARiSMA, if you have docker installed on your local machine and a display is attached to your local machine. This makes use of direct X11 forwarding. | ||
* [remote](remote/): a docker file and instructions for how to run CARiSMA, if you have docker installed on a remote machine, you want to connect via SSH to that remote machine and want to use CARiSMA on your local machine with a display attached. This makes use of SSH's X11 forwarding feature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Prepare X server on local machine | ||
## MacOS | ||
1. Install XQuartz and configure XQuartz to Allow Connections (on first start) | ||
* Open XQuartz preferences | ||
* Go to Security tab | ||
* Allow connections from network clients | ||
* Restart | ||
2. Look up host IP address. In XQuartz run: `ifconfig en0 | grep inet | awk '$1=="inet" {print $2}'` | ||
3. Allow connections from your host IP. In XQuartz run: `xhost + <your_host_ip>` | ||
|
||
## Linux | ||
1. Make sure you have some X11 server running. If you're on wayland, you can use XWayland, which allows you to run X11 applications on wayland. | ||
2. Allow X connections from the container to your local machine (host): Make sure you have the command `xhost` available at your local machine. You can try `which xhost`, which should tell you the path to your executable. The package you may need to install, depends on your distribution. | ||
3. In a shell on the local machine run `xhost +` | ||
|
||
## Windows | ||
1. Install and configure XLaunch: | ||
* Select "Multiple windows" and set "Display number" to 0 and click "Next" | ||
* Choose "Start no client" and click "Next" | ||
* In "Extra settings" tick all boxes and cick "Next" | ||
* Click "Finish" | ||
3. Open your Console and type `set DISPLAY=host.docker.internal:0.0` and press "Enter" | ||
|
||
# Build the image and run the container | ||
|
||
1. Build the Docker image. In your console run: | ||
|
||
``` | ||
docker build -t carisma . | ||
``` | ||
3. Run the Docker container with X11 forwarding: | ||
|
||
``` | ||
docker run -it \ | ||
-e DISPLAY=$DISPLAY \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix \ | ||
carisma | ||
``` | ||
4. Eclipse should start automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Run CARiSMA in a container via an SSH connection | ||
The docker file in this directory allows you to create an ubuntu container on a remote machine that you can connect to via ssh and start CARiSMA to display the GUI on the connecting machine, where a display is attached. Performance depends on the network connection. | ||
|
||
1. On the (remote) docker host: create an authorized_keys file in the directory, where you have the `Dockerfile`. The `authorized_keys` file contains the public SSH key(s) of user(s) that will be allowed to login to the container via their private SSH key(s). | ||
2. On the (remote) docker host: build the image with `docker build -t carisma .` | ||
3. On the (remote) docker host: run the container and optionally map some available docker host port (e.g. 2222) to the container's SSH port (22) with `docker run -it -p 2222:22 carisma` | ||
4. On the local host: connect via ssh (with X11forwarding) and run CARiSMA: `ssh -X -p 3000 root@<docker-host> /opt/carisma/carisma-launcher` | ||
5. Enjoy CARiSMA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters