mirror of
https://github.com/kasmtech/kasm-workspaces-dind.git
synced 2026-01-23 02:35:11 +00:00
KASM-3788 bring in sync with LSIO container
This commit is contained in:
parent
bb552f0f43
commit
1f5d4fda8f
3 changed files with 53 additions and 36 deletions
74
Dockerfile
74
Dockerfile
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.16
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
ARG OVERLAY_VERSION="v2.2.0.3"
|
ARG OVERLAY_VERSION="v2.2.0.3"
|
||||||
|
|
@ -7,41 +7,47 @@ ENV DOCKER_TLS_CERTDIR=""
|
||||||
|
|
||||||
# Container setup
|
# Container setup
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install build packages ****" && \
|
|
||||||
apk add --no-cache --virtual=build-dependencies \
|
|
||||||
alpine-sdk \
|
|
||||||
npm && \
|
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apk add --no-cache \
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
curl \
|
||||||
|
gnupg && \
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
||||||
|
ARCH=$(uname -m | sed 's/x86_64/amd64/g' |sed 's/aarch64/arm64/g') && \
|
||||||
|
echo "deb [arch=${ARCH}] https://download.docker.com/linux/ubuntu jammy stable" > \
|
||||||
|
/etc/apt/sources.list.d/docker.list && \
|
||||||
|
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
|
||||||
|
gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
|
||||||
|
curl -s -L https://nvidia.github.io/libnvidia-container/ubuntu22.04/libnvidia-container.list | \
|
||||||
|
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
||||||
|
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
btrfs-progs \
|
btrfs-progs \
|
||||||
ca-certificates \
|
containerd.io \
|
||||||
coreutils \
|
docker-ce \
|
||||||
curl \
|
docker-ce-cli \
|
||||||
docker \
|
docker-compose-plugin \
|
||||||
docker-cli-compose \
|
drm-info \
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
e2fsprogs-extra \
|
|
||||||
findutils \
|
|
||||||
fuse-overlayfs \
|
fuse-overlayfs \
|
||||||
ip6tables \
|
g++ \
|
||||||
|
gcc \
|
||||||
iptables \
|
iptables \
|
||||||
jq \
|
jq \
|
||||||
|
make \
|
||||||
nodejs \
|
nodejs \
|
||||||
|
nvidia-docker2 \
|
||||||
openssl \
|
openssl \
|
||||||
pigz \
|
pigz \
|
||||||
procps \
|
|
||||||
python3 \
|
python3 \
|
||||||
shadow \
|
|
||||||
shadow-uidmap \
|
|
||||||
sudo \
|
sudo \
|
||||||
tzdata \
|
uidmap \
|
||||||
xfsprogs \
|
xfsprogs && \
|
||||||
xz \
|
|
||||||
zfs && \
|
|
||||||
echo "**** dind setup ****" && \
|
echo "**** dind setup ****" && \
|
||||||
addgroup -S dockremap && \
|
useradd -U dockremap && \
|
||||||
adduser -S -G dockremap dockremap && \
|
usermod -G dockremap dockremap && \
|
||||||
echo 'dockremap:165536:65536' >> /etc/subuid && \
|
echo 'dockremap:165536:65536' >> /etc/subuid && \
|
||||||
echo 'dockremap:165536:65536' >> /etc/subgid && \
|
echo 'dockremap:165536:65536' >> /etc/subgid && \
|
||||||
curl -o \
|
curl -o \
|
||||||
|
|
@ -57,15 +63,14 @@ RUN \
|
||||||
/tmp/s6-overlay-installer / && \
|
/tmp/s6-overlay-installer / && \
|
||||||
echo "**** setup wizard ****" && \
|
echo "**** setup wizard ****" && \
|
||||||
mkdir -p /wizard && \
|
mkdir -p /wizard && \
|
||||||
if [ "${RELEASE_TYPE}" == "develop" ]; then \
|
if [ "${RELEASE_TYPE}" = "develop" ]; then \
|
||||||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases' \
|
KASM_VERSION=$(curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt); \
|
||||||
| jq -r 'map(select(.prerelease)) | sort_by(.published_at) | last | .tag_name'); \
|
|
||||||
fi; \
|
fi; \
|
||||||
if [ "${RELEASE_TYPE}" == "stable" ]; then \
|
if [ "${RELEASE_TYPE}" = "stable" ]; then \
|
||||||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
||||||
| jq -r '.name'); \
|
| jq -r '.name'); \
|
||||||
fi; \
|
fi; \
|
||||||
echo $KASM_VERSION && \
|
echo "${KASM_VERSION}" > /version.txt && \
|
||||||
curl -o \
|
curl -o \
|
||||||
/tmp/wizard.tar.gz -L \
|
/tmp/wizard.tar.gz -L \
|
||||||
"https://github.com/kasmtech/kasm-install-wizard/archive/refs/tags/${KASM_VERSION}.tar.gz" && \
|
"https://github.com/kasmtech/kasm-install-wizard/archive/refs/tags/${KASM_VERSION}.tar.gz" && \
|
||||||
|
|
@ -83,18 +88,19 @@ RUN \
|
||||||
/ && \
|
/ && \
|
||||||
echo "**** copy assets ****" && \
|
echo "**** copy assets ****" && \
|
||||||
cp \
|
cp \
|
||||||
/kasm_release/www/img/thumbnails/*.png \
|
/kasm_release/www/img/thumbnails/*.png /kasm_release/www/img/thumbnails/*.svg \
|
||||||
/wizard/public/img/thumbnails/ && \
|
/wizard/public/img/thumbnails/ && \
|
||||||
cp \
|
cp \
|
||||||
/kasm_release/conf/database/seed_data/default_images_a* \
|
/kasm_release/conf/database/seed_data/default_images_a* \
|
||||||
/wizard/ && \
|
/wizard/ && \
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apk del --purge \
|
apt-get remove -y g++ gcc make && \
|
||||||
build-dependencies && \
|
apt-get -y autoremove && \
|
||||||
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/root/.npm \
|
/tmp/* \
|
||||||
/root/.cache \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
# add init files
|
# add init files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
|
||||||
13
README.md
13
README.md
|
|
@ -18,7 +18,7 @@ It has a few core principles:
|
||||||
version: "2.1"
|
version: "2.1"
|
||||||
services:
|
services:
|
||||||
kasm:
|
kasm:
|
||||||
image: kasmweb/workspaces:1.11.0
|
image: kasmweb/workspaces:1.12.0
|
||||||
privileged: true
|
privileged: true
|
||||||
container_name: kasm
|
container_name: kasm
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -27,6 +27,9 @@ services:
|
||||||
- DOCKER_HUB_PASSWORD=PASS #optional
|
- DOCKER_HUB_PASSWORD=PASS #optional
|
||||||
volumes:
|
volumes:
|
||||||
- /kasm/local/storage:/opt
|
- /kasm/local/storage:/opt
|
||||||
|
- /path/to/profiles:/profiles #optional
|
||||||
|
- /dev/input:/dev/input #optional
|
||||||
|
- /run/udev/data:/run/udev/data #optional
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
|
|
@ -45,6 +48,9 @@ docker run -d \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
-v /kasm/local/storage:/opt \
|
-v /kasm/local/storage:/opt \
|
||||||
|
-v /path/to/profiles:/profiles `#optional` \
|
||||||
|
-v /dev/input:/dev/input `#optional` \
|
||||||
|
-v /run/udev/data:/run/udev/data `#optional` \
|
||||||
kasmweb/workspaces:1.11.0
|
kasmweb/workspaces:1.11.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -53,6 +59,9 @@ docker run -d \
|
||||||
| `-p 443` | Kasm Workspaces web UI (HTTPS) |
|
| `-p 443` | Kasm Workspaces web UI (HTTPS) |
|
||||||
| `-p 3000` | Kasm Installation and upgrade wizard (HTTPS) |
|
| `-p 3000` | Kasm Installation and upgrade wizard (HTTPS) |
|
||||||
| `-v /kasm/local/storage:/opt` | Docker and Kasm Storage |
|
| `-v /kasm/local/storage:/opt` | Docker and Kasm Storage |
|
||||||
|
| `-v /profiles` | Optionally specify a path for persistent profile storage. |
|
||||||
|
| `-v /dev/input` | Optional for gamepad support. |
|
||||||
|
| `-v /run/udev/data` | Optional for gamepad support. |
|
||||||
| `-e KASM_PORT=443` | If not using port 443 this needs to be set to the port you are binding to (optional) |
|
| `-e KASM_PORT=443` | If not using port 443 this needs to be set to the port you are binding to (optional) |
|
||||||
| `-e DOCKER_HUB_USERNAME=USER` | Dockerhub username for logging in on init (optional) |
|
| `-e DOCKER_HUB_USERNAME=USER` | Dockerhub username for logging in on init (optional) |
|
||||||
| `-e DOCKER_HUB_PASSWORD=PASS` | Dockerhub password for logging in on init (optional) |
|
| `-e DOCKER_HUB_PASSWORD=PASS` | Dockerhub password for logging in on init (optional) |
|
||||||
|
|
@ -62,7 +71,7 @@ docker run -d \
|
||||||
|
|
||||||
| Tag | Description |
|
| Tag | Description |
|
||||||
| :----: | --- |
|
| :----: | --- |
|
||||||
| 1.11.0 | Latest stable release |
|
| 1.12.0 | Latest stable release |
|
||||||
| develop | Development head |
|
| develop | Development head |
|
||||||
|
|
||||||
| Architecture | Tag |
|
| Architecture | Tag |
|
||||||
|
|
|
||||||
2
root/gpuinfo.sh
Executable file
2
root/gpuinfo.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/bash
|
||||||
|
drm_info -j 2>/dev/null| jq -c 'with_entries(.value |= .driver.desc)'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue