Kasm Workspaces 是一个容器流式传输平台,通过基于浏览器的方式提供对桌面、应用程序和 Web 服务的访问,采用容器化桌面基础设施 (CDI) 创建按需、一次性的 Docker 容器,适用于远程浏览器隔离、数据防泄漏、桌面即服务等场景。

111 次收藏下载次数: 0状态:社区镜像维护者:LinuxServer.io 社区镜像仓库类型:镜像最近更新:
下载命令
点击查看

The https://linuxserver.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • https://blog.linuxserver.io - all the things you can do with our containers including How-To guides, opinions and much more!
  • https://linuxserver.io/*** - realtime support / chat with the community and the team.
  • https://github.com/orgs/linuxserver/discussions - post on our community forum.
  • https://github.com/linuxserver - view the source for all of our repositories.
  • https://opencollective.com/linuxserver - please *** helping us by either donating or contributing to our budget

https://github.com/linuxserver/docker-kasm

https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections.

The rendering of the graphical-based containers is powered by the open-source project https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc.

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list and our announcement https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/.

Simply pulling lscr.io/linuxserver/kasm:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

ArchitectureAvailableTag
x86-64✅amd64-<version tag>
arm64✅arm64v8-<version tag>

Application Setup

This container uses https://www.docker.com/blog/docker-can-now-run-within-docker/ and requires being run in privileged mode. This container also requires an initial setup that runs on port 3000.

First-run setup

The install wizard requires an auth token, a new one is printed to the container log every time the wizard starts:

bash
docker logs kasm 2>&1 | grep -A1 'setup token (required'

Access the install wizard at [***]:3000/#token= (or enter the token when prompted) and follow the instructions there. In our example run/compose the install wizard is only bound to 127.0.0.1, so if you need to access it over the network this will need changing.

Once setup is complete access [***]:443 and login with the credentials you entered during setup. The default users are:



Never expose the install wizard to the internet and ensure KASM_SETUP is set to false during normal use.

Upgrading KASM

In order to upgrade Kasm, first make sure you are using the latest docker image, and then set KASM_SETUP=true to allow you to perform the update from the installation wizard. Docker image update and recreation of container alone won't upgrade Kasm.

Following the upgrade, you will need to update any workspace image tags to match the new version.

GPU Support

During installation an option will be presented to force all Workspace containers to mount in and use a specific GPU. If using an NVIDIA GPU you will need to pass -e NVIDIA_VISIBLE_DEVICES=all or --gpus all and have the https://github.com/NVIDIA/nvidia-container-toolkit installed on the host. Also if using NVIDIA, Kasm Workspaces has native NVIDIA support so you can optionally opt to simply use that instead of the manual override during installation.

When NVIDIA devices are passed to this container, a https://github.com/cncf-tags/container-device-interface specification describing them is generated inside the DinD layer on startup and the NVIDIA runtime is made the default one there. This is what allows the driver, and with it Vulkan and OpenGL, to reach the Workspace containers.

Gamepad support

In order to properly create virtual Gamepads you will need to mount from your host /dev/input and /run/udev/data. Please see HERE for instructions on enabling gamepad support.

Persistant profiles

In order to use persistant profiles in Workspaces you will need to mount in a folder to use from your host to /profiles. From there when configuring a workspace you can set the Persistant Profile Path to IE /profiles/ubuntu-focal/{username}/, more infomation can be found HERE.

Reverse proxy

A sample for https://github.com/linuxserver/docker-swag can be found https://raw.githubusercontent.com/linuxserver/reverse-proxy-confs/master/kasm.subdomain.conf.sample. Post installation you will need to modify the "Proxy Port" setting under the default zone to 0 as outlined here to launch Workspaces sessions.

Additional notes

  • The web interface port (default 443) needs to match the env variable KASM_PORT and both the inside and outside port i.e. to use port 4443, set KASM_PORT=4443 -p 4443:4443
  • Unraid users due to the DinD storage layer /opt/ should be mounted directly to a disk IE /mnt/disk1/appdata/path or optimally with a cache disk at /mnt/cache/appdata/path
  • Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.

Strict reverse proxies

This image uses a self-signed certificate by default. This naturally means the scheme is https. If you are using a reverse proxy which validates certificates, you need to https://docs.linuxserver.io/faq#strict-proxy.

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

[!NOTE] Unless a parameter is flagged as 'optional', it is mandatory and a value must be provided.

docker-compose (recommended, https://docs.linuxserver.io/general/docker-compose)

yaml
---
services:
  kasm:
    image: lscr.io/linuxserver/kasm:latest
    container_name: kasm
    privileged: true
    security_opt:
      - apparmor:runc #optional
    environment:
      - KASM_PORT=443
      - KASM_SETUP=false
      - DOCKER_HUB_USERNAME=USER #optional
      - DOCKER_HUB_PASSWORD=PASS #optional
      - DOCKER_MTU=1500 #optional
    volumes:
      - /path/to/kasm/data:/opt
      - /path/to/kasm/profiles:/profiles #optional
      - /dev/input:/dev/input #optional
      - /run/udev/data:/run/udev/data #optional
    ports:
      - 127.0.0.1:3000:3000
      - 443:443
    stop_grace_period: "90s" #optional
    restart: unless-stopped

docker cli (https://docs.docker.com/engine/reference/commandline/cli/)

bash
docker run -d \
  --name=kasm \
  --privileged \
  --security-opt apparmor=runc `#optional` \
  -e KASM_PORT=443 \
  -e KASM_SETUP=false \
  -e DOCKER_HUB_USERNAME=USER `#optional` \
  -e DOCKER_HUB_PASSWORD=PASS `#optional` \
  -e DOCKER_MTU=1500 `#optional` \
  -p 127.0.0.1:3000:3000 \
  -p 443:443 \
  -v /path/to/kasm/data:/opt \
  -v /path/to/kasm/profiles:/profiles `#optional` \
  -v /dev/input:/dev/input `#optional` \
  -v /run/udev/data:/run/udev/data `#optional` \
  --stop-timeout="90s" `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/kasm:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

ParameterFunction
-p 127.0.0.1:3000:3000Kasm Installation wizard. (https)
-p 443:443Kasm Workspaces interface. (https)
-e KASM_PORT=443Specify the port you bind to the outside for Kasm Workspaces.
-e KASM_SETUP=falseSet to true to enable the Kasm setup page, first-run setup is always enabled.
-e DOCKER_HUB_USERNAME=USEROptionally specify a DockerHub Username to pull private images.
-e DOCKER_HUB_PASSWORD=PASSOptionally specify a DockerHub password to pull private images.
-e DOCKER_MTU=1500Optionally specify the mtu options passed to dockerd.
-v /optDocker and installation storage.
-v /profilesOptionally specify a path for persistent profile storage.
-v /dev/inputOptional for gamepad support.
-v /run/udev/dataOptional for gamepad support.
--stop-timeout=Increase container shutdown delay to give Kasm services time to stop cleanly.
--security-opt apparmor=runcSome hosts require this on top of privileged for namespacing to work properly inside the DinD layer.

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

bash
-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

Docker Mods

We publish various https://github.com/linuxserver/docker-mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    bash
    docker exec -it kasm /bin/bash
    
  • To monitor the logs of the container in realtime:

    bash
    docker logs -f kasm
    
  • Container version number:

    bash
    docker inspect -f '{{ index .Config.Labels "build_version" }}' kasm
    
  • Image version number:

    bash
    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/kasm:latest
    

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      bash
      docker-compose pull
      
    • Single image:

      bash
      docker-compose pull kasm
      
  • Update containers:

    • All containers:

      bash
      docker-compose up -d
      
    • Single container:

      bash
      docker-compose up -d kasm
      
  • You can also remove the old dangling images:

    bash
    docker image prune
    

Via Docker Run

  • Update the image:

    bash
    docker pull lscr.io/linuxserver/kasm:latest
    
  • Stop the running container:

    bash
    docker stop kasm
    
  • Delete the container:

    bash
    docker rm kasm
    
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    bash
    docker image prune
    

Image Update Notifications - Diun (Docker Image Update Notifier)

[!TIP] We recommend https://crazymax.dev/diun/ for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

bash
git clone https://github.com/linuxserver/docker-kasm.git
cd docker-kasm
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/kasm:latest .

The ARM variants can be built on x86_64 hardware and vice versa using lscr.io/linuxserver/qemu-static

bash
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 17.11.26: - Install wizard now requires an auth token.
  • 15.11.26: - Add KASM_SETUP toggle, default to disabling install wizard after first-run.
  • 07.08.26: - Fix NVIDIA passthrough to Workspace containers by generating a CDI specification inside the DinD layer.
  • 04.08.26: - Give kasm_manager a healthcheck start period so a cold start does not leave kasm_proxy created but never started.
  • 16.04.26: - Update for 1.18.1 release. Use rolling service images. Bump docker to v29.
  • 13.11.25: - Pin docker to v28 to avoid API deprecation issues.
  • 22.10.25: - Update for 1.18.0 release.
  • 08.06.25: - Deprecate develop branch.
  • 03.06.25: - Rebase to Ubuntu Noble. Update for 1.17.0 release.
  • 09.11.24: - Update base image for 1.16.1 release.
  • 24.09.24: - Add base users in docker build logic to survive container upgrades.
  • 17.09.24: - Update base image for 1.16.0 release and fix Nvidia support.
  • 16.02.24: - Update base image for 1.15.0 release.
  • 22.08.23: - Update base image for 1.14.0 release.
  • 07.04.23: - Add mod layer for ingesting LSIO images for 1.13.0 release.
  • 28.03.23: - Pin compose to 2.5.0 to be in sync with upstream requirements.
  • 05.11.22: - Rebase to Jammy, add support for GPUs, add support for Gamepads.
  • 23.09.22: - Migrate to s6v3.
  • 02.07.22: - Initial Release.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 kasm 镜像标签

docker pull docker.xuanyuan.run/linuxserver/kasm:<标签>

DockerHub 原生拉取命令

docker pull linuxserver/kasm:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告