.. title:: Images
Images
===========
Kasm server allows administrators to specify images that users can provision. These images can provide a full desktop
or a single application.
Default Images
--------------
Kasm Technologies maintains and publishes several default Images. The **edge** editions are automatically built and pushed regularly with the latest software updates and security patches.
The Kasm installation will regularly pull the updated images and start using them for newly created Kasms.
The following are the Kasm Technologies maintained images.
.. table:: Default Kasm Images
:widths: 75, 85, 20
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
| kasmweb/desktop:|release| | A standard desktop with minimal | `DockerHub `__ |
| kasmweb/desktop:|release|-edge | software. This image is open source. | `BitBucket `__ |
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
| kasmweb/desktop-deluxe:|release| | A desktop with additional software | `DockerHub `__ |
| kasmweb/desktop-deluxe:|release|-edge | such as Libre Office, Visual Studio | |
| | code, and more. | |
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
| kasmweb/firefox:|release| | A firefox browser only, no desktop. | `DockerHub `__ |
| kasmweb/firefox:|release|-edge | This image is open source. | `BitBucket `__ |
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
| kasmweb/chrome:|release| | A chrome browser only, no desktop. | `DockerHub `__ |
| kasmweb/chrome:|release|-edge | This image is open source. | `BitBucket `__ |
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
| kasmweb/tor-browser:|release| | Tor-browser only, no desktop. | `DockerHub `__ |
| kasmweb/tor-browser:|release|-edge | | |
+--------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+
Edge Images
-----------
Kasm Technologies also publishes **edge** editions of the Default images that are automatically built and published nightly with the latest software and patches.
Administrators may choose to use these images to always have up-to-date end-user Kasms
Custom Kasm Images
------------------
Administrators can create their own images, they must be based off kasmweb/core. See the open source project at
https://bitbucket.org/kasmtech/kasm_release/src to see the dockerfile for kasmweb/desktop and kasmweb/firefox.
Pull down our code to modify kasmweb/desktop, or create your own based off kasmweb/core and then build locally.
.. code-block:: bash
sudo docker build -t kasmweb/desktop:custom -f dockerfile-kasm-desktop .
It is highly recommended to use a docker registry. It can be Docker Hub or a private registry. However, you can run
images built locally on the server that houses the Agent role.
Guides are available for :doc:`Building Custom Images` and
:doc:`Creating Image Maintenance Processes`
Add/Edit Kasm Images
--------------------
From the Images menu you can edit existing images or add new images. There are a number of properties that can be
defined for an image.
+----------------------------------+-----------------------------------------------------------------------------------+
| Name | Image Name |
+----------------------------------+-----------------------------------------------------------------------------------+
| Description | Description of Image |
+----------------------------------+-----------------------------------------------------------------------------------+
| Friendly Name | Image name shown to user |
+----------------------------------+-----------------------------------------------------------------------------------+
| Thumbnail URL | (Optional) Address of container icon |
+----------------------------------+-----------------------------------------------------------------------------------+
| Cores | Amount of CPU cores allocated per Image |
+----------------------------------+-----------------------------------------------------------------------------------+
| Memory | Amount of Memory allocated per Image, in megabytes |
+----------------------------------+-----------------------------------------------------------------------------------+
| Enabled | The image is enabled for use. If unchecked the image |
| | will not be available for users to provision. Agents |
| | will not be given instructions to download Images |
| | that are disabled. |
+----------------------------------+-----------------------------------------------------------------------------------+
| Docker Registry | The docker registry to pull the images from |
| | For Docker Hub use https://index.docker.io/v1/ |
| | Leave this option blank if you intend to use local |
| | images built directly on the Agent server. |
+----------------------------------+-----------------------------------------------------------------------------------+
| Docker Registry Username | (Optional) Username |
+----------------------------------+-----------------------------------------------------------------------------------+
| Docker Registry Password | (Optional) Password |
+----------------------------------+-----------------------------------------------------------------------------------+
| Hash | (Optional) hash of image |
+----------------------------------+-----------------------------------------------------------------------------------+
| Persistent Profile Path | (Optional) Absolute path of the location to store |
| | user's persistent profile. See |
| | `Persistent Profiles <../how_to/persistent_profiles.html>`_ |
| | for more details. |
+----------------------------------+-----------------------------------------------------------------------------------+
| Volume Mappings | (Optional) Json data for |
| | `Volume Mappings <../how_to/volume_mapping.html>`_ |
+----------------------------------+-----------------------------------------------------------------------------------+
| Docker Run Config Override | (Optional) Json data for specifying additional |
| | docker run arguments, see |
| | Python Docker API for json format |
| | https://docker-py.readthedocs.io/en/stable/ |
+----------------------------------+-----------------------------------------------------------------------------------+
| Docker Exec Config | (Optional) Json data for specifying commands |
| | to executed when a Kasm is started or resumed. |
| | See the `Docker Exec Config`_ for details |
+----------------------------------+-----------------------------------------------------------------------------------+
| Restrict Image to Docker Network | (Optional) Instances of this image will only |
| | be created on agent servers with this docker |
| | network. |
+----------------------------------+-----------------------------------------------------------------------------------+
| Restrict Image to Kasm Agent | (Optional) Instances of this image will only |
| | be created on this agent server. |
+----------------------------------+-----------------------------------------------------------------------------------+
| Restrict Image to Zone | (Optional) Instances of this image will only |
| | be created on Agents within the selected |
| | :term:`Deployment Zone` |
+----------------------------------+-----------------------------------------------------------------------------------+
.. note::
The Images are by default added to the all users group. This behavior can be changed with the `Add Images To Default Group `_
server setting.
Docker Exec Config
------------------
The Docker Exec configurations allow administrators to configure custom commands to be executed when a user creates or
resumes a Kasm.
This JSON dictionary configuration accepts two top-level keys **first_launch**, and **go**.
* first_launch
This command is executed after the Kasm is launched.
* go
This command is executed when the user requests to create or resume a Kasm via the /go url. If the Kasm doesnt
exists yet, and will be created for the first time, the **first_launch** command will take priority.
The following example demonstrates how to use the Docker Exex Config for the default **kasmweb/chrome** Image for a
seamless browser isolation configuration.
See `Browser Isolation `_ for more details.
.. code-block:: Javascript
{
"first_launch": {
"cmd": "bash -c 'google-chrome --start-maximized \"$KASM_URL\"'",
"environment": {
"LAUNCH_URL": ""
}
},
"go": {
"cmd": "bash -c 'google-chrome --start-maximized \"$KASM_URL\"'"
}
}