.. 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 comes by default with a base images that are maintained by Kasm Technologies. The advantage of using these images directly is that when they are updated, your Kasm installation will pull them down immediately and start using them for newly created Kasms. This ensures images are always up to date with the latest security patches. The following are the Kasm maintained images. .. table:: Default Kasm Images :widths: 75, 85, 20 +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ | **kasmweb/desktop:1.5.0** | A standard desktop with minimal | `DockerHub `__ | | | software. This image is open source. | `BitBucket `__ | +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ | **kasmweb/desktop-deluxe:1.5.0** | A desktop with additional software | `DockerHub `__ | | | such as Libre Office, Visual Studio | | | | code, and more. | | +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ | **kasmweb/firefox:1.5.0** | A firefox browser only, no desktop. | `DockerHub `__ | | | This image is open source. | `BitBucket `__ | +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ | **kasmweb/firefox-mobile:1.5.0** | A firefox browser only, no desktop. | `DockerHub `__ | | | This image is optimized for mobile | | | | devices. | | +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ | **kasmweb/chrome:1.5.0** | A chrome browser only, no desktop. | `DockerHub `__ | | | This image is open source. | `BitBucket `__ | +----------------------------------+--------------------------------------+-----------------------------------------------------------------+ 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 local images. In order to run local images, not pulled for a remote registry, you must disable image validation on each host. This setting is located in the file /opt/kasm/current/conf/app/agent.app.config.yaml. .. code-block:: guess validate_images: false After any changes to the agent configuration, the agent must be restarted. .. code-block:: bash sudo docker restart kasm_agent 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 bytes | +----------------------------------+------------------------------------------------------+ | Enabled | The image is enabled for users | +----------------------------------+------------------------------------------------------+ | Docker Registry | The docker registry to pull the images from | | | For Docker Hub use https://index.docker.io/v1/ | | | You can build images locally, but you still | | | need to specify a registry. | +----------------------------------+------------------------------------------------------+ | Docker Token | (Optional) Password | +----------------------------------+------------------------------------------------------+ | Docker User | (Optional) Username | +----------------------------------+------------------------------------------------------+ | Hash | (Optional) hash of image | +----------------------------------+------------------------------------------------------+ | Persistent Profile Config | (Optional) Json data for enabling | | | `persistent profile `_ | +----------------------------------+------------------------------------------------------+ | 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` | +----------------------------------+------------------------------------------------------+ 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\"'" } }