mirror of
https://github.com/linuxserver/docker-kasm.git
synced 2026-01-23 10:25:13 +00:00
Compare commits
301 commits
1.11.0-ls1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33ec5ebfcf | ||
|
|
de708d0f1a | ||
|
|
0a50493b53 | ||
|
|
220be4bd54 | ||
|
|
ec3afa6402 | ||
|
|
19abc78f8d | ||
|
|
82cfeaa311 | ||
|
|
e20dbbe440 | ||
|
|
4701869a66 | ||
|
|
c0968785cb | ||
|
|
b95c53545d | ||
|
|
7b3dac5ee3 | ||
|
|
51c9d452e2 | ||
|
|
c2298ad0c9 | ||
|
|
3c49b2b4cb | ||
|
|
7c9a0aed55 | ||
|
|
23d39dcd9a | ||
|
|
bae5ababa9 | ||
|
|
95ec2cbdf1 | ||
|
|
289e17847c | ||
|
|
0e7c148a8f | ||
|
|
f5d328b154 | ||
|
|
cfdb797fdf | ||
|
|
0086c812f1 | ||
|
|
fb3f4d0757 | ||
|
|
6b9159d575 | ||
|
|
d97c3d41dd | ||
|
|
0fe56f2c62 | ||
|
|
796ddd11b5 | ||
|
|
0e7562f8d7 | ||
|
|
3c9aa26efa | ||
|
|
55ded95d1d | ||
|
|
9c8ad18759 | ||
|
|
267c63c64a | ||
|
|
9472ed4330 | ||
|
|
fe1d4c8143 | ||
|
|
297ed3b760 | ||
|
|
f67a4889eb | ||
|
|
b1bb19b80a | ||
|
|
9519a4895d | ||
|
|
416f3be02c | ||
|
|
e14e6bcd2f | ||
|
|
9258b22a60 | ||
|
|
a57aaa4cf0 | ||
|
|
0c32ceb14f | ||
|
|
93e79f0a8d | ||
|
|
7ab1b0d688 | ||
|
|
72f99225f8 | ||
|
|
faf4591cbe | ||
|
|
9477fb27e9 | ||
|
|
9e718db446 | ||
|
|
1298475226 | ||
|
|
5bdcf490fa | ||
|
|
1a35177d10 | ||
|
|
e616b19ef7 | ||
|
|
f5496835d6 | ||
|
|
398190ba09 | ||
|
|
5b752d1735 | ||
|
|
a2a6a9ab16 | ||
|
|
ef4d9dc930 | ||
|
|
a771857cc8 | ||
|
|
cb8facfd6b | ||
|
|
3fef74437e | ||
|
|
841c4a36bc | ||
|
|
71955caabe | ||
|
|
6836f2924a | ||
|
|
ffe2662a5c | ||
|
|
362c27a047 | ||
|
|
2e78b8d5da | ||
|
|
83bcec09bb | ||
|
|
4167bc2c3e | ||
|
|
fd1e1c9e61 | ||
|
|
46259f8f76 | ||
|
|
5d2590db21 | ||
|
|
58cf8cd004 | ||
|
|
f6608ce8b4 | ||
|
|
daf4f32716 | ||
|
|
4572c55055 | ||
|
|
b6c429bd1a | ||
|
|
36c0bcb1b8 | ||
|
|
1ee9fa44c0 | ||
|
|
b831e0fd0b | ||
|
|
8627f91177 | ||
|
|
e948a14f4e | ||
|
|
14623f7f88 | ||
|
|
d7e003bbba | ||
|
|
d8d1169fa6 | ||
|
|
1e8dfab7ba | ||
|
|
67c65e0456 | ||
|
|
f2e565d09a | ||
|
|
413eb8b18f | ||
|
|
48b02f07d2 | ||
|
|
7e75fa835a | ||
|
|
b7f5e2924a | ||
|
|
f3eb3189dd | ||
|
|
2979961488 | ||
|
|
2d47e5cdc7 | ||
|
|
e5f580b3f0 | ||
|
|
3c55a5089d | ||
|
|
b1633f86b3 | ||
|
|
0b8658dee8 | ||
|
|
670784a1db | ||
|
|
1e1a49b9cd | ||
|
|
0edb177bfd | ||
|
|
4a851f7bd8 | ||
|
|
689479e29f | ||
|
|
9789277974 | ||
|
|
f26e1e336a | ||
|
|
1aa82ef8c3 | ||
|
|
9fb45fca3a | ||
|
|
945c8a30e8 | ||
|
|
f89bd232fd | ||
|
|
c4d7ce8050 | ||
|
|
7d16567860 | ||
|
|
b8d558a54f | ||
|
|
4a6f301fa3 | ||
|
|
c27c4bf483 | ||
|
|
d715287b2f | ||
|
|
19ec2f30d3 | ||
|
|
31c908cea5 | ||
|
|
9cd701d730 | ||
|
|
6e3ffefc84 | ||
|
|
b46bc370e0 | ||
|
|
5a92d17ac9 | ||
|
|
6ccdb0fe6d | ||
|
|
93455f663d | ||
|
|
c52bf48f52 | ||
|
|
20c5b96dda | ||
|
|
9946df6acf | ||
|
|
037645e90a | ||
|
|
2d5580a334 | ||
|
|
e42ccf1193 | ||
|
|
9892c25a78 | ||
|
|
cb2f00b354 | ||
|
|
79098c667d | ||
|
|
02eaa44ba3 | ||
|
|
001f8e2c9d | ||
|
|
3f2fd698ef | ||
|
|
00f3bc1ea1 | ||
|
|
f69212a06b | ||
|
|
c31b2e4210 | ||
|
|
5525593932 | ||
|
|
953c3d1d23 | ||
|
|
80110da5bb | ||
|
|
e157876ce9 | ||
|
|
163b75a1a3 | ||
|
|
a8b8bacd69 | ||
|
|
6a1ddc3ddc | ||
|
|
00a0f71423 | ||
|
|
0dc2e23ecf | ||
|
|
c4c2fe2261 | ||
|
|
b4406b78e7 | ||
|
|
fb0bdce34f | ||
|
|
a2d0a8429d | ||
|
|
77f8fbe601 | ||
|
|
8f5f75bd9f | ||
|
|
598921892e | ||
|
|
4935ad00b5 | ||
|
|
cb24d79643 | ||
|
|
3d8d94fd70 | ||
|
|
0af539b8f2 | ||
|
|
3ec9bf3c21 | ||
|
|
a52bf328c6 | ||
|
|
f01dfb13b8 | ||
|
|
914f2ade30 | ||
|
|
e9c4724a95 | ||
|
|
1343ad80ee | ||
|
|
44ea0e797c | ||
|
|
943721cad8 | ||
|
|
636f5fa221 | ||
|
|
c1f9b3c505 | ||
|
|
d9143c1ccd | ||
|
|
c06319bb21 | ||
|
|
0e90331c50 | ||
|
|
a32bca3d49 | ||
|
|
00a170ac01 | ||
|
|
07dbc0b613 | ||
|
|
30823099a3 | ||
|
|
fd6c6a0bb6 | ||
|
|
c8c79308bd | ||
|
|
b42423f6cd | ||
|
|
7814ed87f6 | ||
|
|
06e92edc47 | ||
|
|
fdb059517a | ||
|
|
22dfb130b6 | ||
|
|
a7c68125ed | ||
|
|
0d651df58e | ||
|
|
995b677bb7 | ||
|
|
dab68a02dd | ||
|
|
8b7e4575b3 | ||
|
|
3fa55cdd48 | ||
|
|
905dd62921 | ||
|
|
fae4a2db43 | ||
|
|
1bdda7f71f | ||
|
|
d100aae40d | ||
|
|
652d4c6cdf | ||
|
|
3a6cdcaff4 | ||
|
|
e21e23fa68 | ||
|
|
883a0ed95e | ||
|
|
ef8582b3c8 | ||
|
|
6532167cb0 | ||
|
|
ea039b5b32 | ||
|
|
cc3fa24d7f | ||
|
|
38c1258910 | ||
|
|
78cd072fa8 | ||
|
|
734c928ea7 | ||
|
|
fb6367f7ee | ||
|
|
53e1c97f3f | ||
|
|
5f74e10eec | ||
|
|
165ae39d5f | ||
|
|
8198c1d201 | ||
|
|
06a05b9b49 | ||
|
|
1c55fb99c5 | ||
|
|
930a53ab12 | ||
|
|
a823bb7bca | ||
|
|
4ed010be43 | ||
|
|
c92287948e | ||
|
|
98d933d3fb | ||
|
|
15e999a826 | ||
|
|
edd90db089 | ||
|
|
d5080cd13e | ||
|
|
8c99486ab5 | ||
|
|
92694097dd | ||
|
|
15f1f68572 | ||
|
|
56cf34e326 | ||
|
|
de46071edb | ||
|
|
402d51a69a | ||
|
|
d0fee6de57 | ||
|
|
2f47fecb62 | ||
|
|
f7ddb73460 | ||
|
|
1ae52ff2ac | ||
|
|
9819fdd674 | ||
|
|
e5dfcd30c8 | ||
|
|
f3f6c36236 | ||
|
|
fa5896a5a1 | ||
|
|
5323f94f74 | ||
|
|
a7544a45c4 | ||
|
|
cd07814def | ||
|
|
3777f22669 | ||
|
|
3c940d2494 | ||
|
|
2851f419c3 | ||
|
|
473798ace6 | ||
|
|
6554c78d62 | ||
|
|
d623b46faf | ||
|
|
d95c6b01a6 | ||
|
|
cd937ecb68 | ||
|
|
79315f4858 | ||
|
|
612635f760 | ||
|
|
221eef24bd | ||
|
|
61c50a03ec | ||
|
|
21a5df756c | ||
|
|
9e26c5fc33 | ||
|
|
970341be8c | ||
|
|
83d2fa5662 | ||
|
|
9fabaee8bb | ||
|
|
962025a869 | ||
|
|
9505c239c3 | ||
|
|
95c301578a | ||
|
|
42e05e007a | ||
|
|
cdb07b7704 | ||
|
|
aaa6b48ad4 | ||
|
|
7e4f3c711e | ||
|
|
826c30d258 | ||
|
|
33d87c3dfc | ||
|
|
ae8f233d0d | ||
|
|
66e1dc63d7 | ||
|
|
143ab005ae | ||
|
|
3ce78155ea | ||
|
|
80f418eb0d | ||
|
|
758415e506 | ||
|
|
ac2c690791 | ||
|
|
be1761c3f0 | ||
|
|
eeafe62dc8 | ||
|
|
9912f4490b | ||
|
|
178b4b930d | ||
|
|
821a9c6e01 | ||
|
|
4f69c32390 | ||
|
|
6a61454ab6 | ||
|
|
d53ed03e14 | ||
|
|
b55f524fc3 | ||
|
|
c91bd3fabd | ||
|
|
aef3a72acc | ||
|
|
b2bd92b66c | ||
|
|
196b0e8bbb | ||
|
|
80fa3c519d | ||
|
|
33f913b37e | ||
|
|
970fc1c643 | ||
|
|
b399486978 | ||
|
|
20e1caa973 | ||
|
|
fa6bf4b396 | ||
|
|
0588bd2a10 | ||
|
|
fda973e36c | ||
|
|
ea8f193574 | ||
|
|
222e899af3 | ||
|
|
f6b0049e50 | ||
|
|
f92f3dfebb | ||
|
|
ca6d4ecd9e | ||
|
|
fee9628556 | ||
|
|
2da5f09703 | ||
|
|
10af211881 | ||
|
|
37bad2667c |
47 changed files with 2386 additions and 954 deletions
|
|
@ -15,6 +15,6 @@ trim_trailing_whitespace = false
|
|||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
|
||||
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
|
|||
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
|
|
@ -6,7 +6,7 @@
|
|||
* Read, and fill the Pull Request template
|
||||
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
|
||||
|
||||
## Common files
|
||||
|
||||
|
|
@ -105,10 +105,10 @@ docker build \
|
|||
-t linuxserver/kasm:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord chat support
|
||||
url: https://discord.gg/YWrKVTn
|
||||
url: https://linuxserver.io/discord
|
||||
about: Realtime support / chat with the community and the team.
|
||||
|
||||
- name: Discourse discussion forum
|
||||
|
|
|
|||
40
.github/ISSUE_TEMPLATE/issue.bug.md
vendored
40
.github/ISSUE_TEMPLATE/issue.bug.md
vendored
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
|
||||
|
||||
<!--- Provide a general summary of the bug in the Title above -->
|
||||
|
||||
------------------------------
|
||||
|
||||
## Expected Behavior
|
||||
<!--- Tell us what should happen -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
|
||||
## Steps to Reproduce
|
||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Environment
|
||||
**OS:**
|
||||
**CPU architecture:** x86_64/arm32/arm64
|
||||
**How docker service was installed:**
|
||||
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
|
||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
||||
|
||||
## Command used to create docker container (run/create/compose/screenshot)
|
||||
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
|
||||
|
||||
## Docker logs
|
||||
<!--- Provide a full docker log, output of "docker logs kasm" -->
|
||||
76
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file
76
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# Based on the issue template
|
||||
name: Bug report
|
||||
description: Create a report to help us improve
|
||||
title: "[BUG] <title>"
|
||||
labels: [Bug]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: Tell us what happens instead of the expected behavior.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: Tell us what should happen.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
2. With this config...
|
||||
3. Run '...'
|
||||
4. See error...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Environment
|
||||
description: |
|
||||
examples:
|
||||
- **OS**: Ubuntu 20.04
|
||||
- **How docker service was installed**: distro's packagemanager
|
||||
value: |
|
||||
- OS:
|
||||
- How docker service was installed:
|
||||
render: markdown
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: CPU architecture
|
||||
options:
|
||||
- x86-64
|
||||
- arm64
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Docker creation
|
||||
description: |
|
||||
Command used to create docker container
|
||||
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
description: |
|
||||
Provide a full docker log, output of "docker logs kasm"
|
||||
label: Container logs
|
||||
placeholder: |
|
||||
Output of `docker logs kasm`
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
|
|
@ -1,25 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
|
||||
|
||||
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
|
||||
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
|
||||
|
||||
<!--- Provide a general summary of the request in the Title above -->
|
||||
|
||||
------------------------------
|
||||
|
||||
## Desired Behavior
|
||||
<!--- Tell us what should happen -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
|
||||
## Alternatives Considered
|
||||
<!--- Tell us what other options you have tried or considered -->
|
||||
31
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file
31
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Based on the issue template
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
title: "[FEAT] <title>"
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is this a new feature request?
|
||||
description: Please search to see if a feature request already exists.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Wanted change
|
||||
description: Tell us what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Reason for change
|
||||
description: Justify your request, why do you want it, what is the benefit.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Proposed code change
|
||||
description: Do you have a potential code change in mind?
|
||||
validations:
|
||||
required: false
|
||||
19
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file
19
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Issue & PR Tracker
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened,reopened,labeled,unlabeled,closed]
|
||||
pull_request_target:
|
||||
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
|
||||
pull_request_review:
|
||||
types: [submitted,edited,dismissed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
manage-project:
|
||||
permissions:
|
||||
issues: write
|
||||
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
|
||||
secrets: inherit
|
||||
16
.github/workflows/call_issues_cron.yml
vendored
Normal file
16
.github/workflows/call_issues_cron.yml
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
name: Mark stale issues and pull requests
|
||||
on:
|
||||
schedule:
|
||||
- cron: '16 9 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
|
||||
secrets: inherit
|
||||
145
.github/workflows/external_trigger.yml
vendored
145
.github/workflows/external_trigger.yml
vendored
|
|
@ -3,24 +3,42 @@ name: External Trigger Main
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
external-trigger-master:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
- uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
env:
|
||||
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_KASM_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_KASM_MASTER is set; skipping trigger. ****"
|
||||
printf "# External trigger for docker-kasm\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^kasm_master_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`kasm_master_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
||||
elif grep -q "^kasm_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`kasm_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_KASM_MASTER\". ****"
|
||||
echo "**** Retrieving external version ****"
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> External trigger running off of master branch. To disable this trigger, add \`kasm_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest" | jq -r '. | .tag_name')
|
||||
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^kasm_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||
echo "**** Can't retrieve external version, exiting ****"
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="Can't retrieve external version for kasm branch master"
|
||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-kasm/actions/runs/${{ github.run_id }}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
|
|
@ -28,65 +46,102 @@ jobs:
|
|||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
exit 1
|
||||
fi
|
||||
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||
echo "**** External version: ${EXT_RELEASE} ****"
|
||||
echo "**** Retrieving last pushed version ****"
|
||||
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
||||
image="linuxserver/kasm"
|
||||
tag="latest"
|
||||
token=$(curl -sX GET \
|
||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fkasm%3Apull" \
|
||||
| jq -r '.token')
|
||||
multidigest=$(curl -s \
|
||||
multidigest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Accept: application/vnd.oci.image.index.v1+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}")
|
||||
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
||||
# If there's a layer element it's a single-arch manifest so just get that digest
|
||||
digest=$(jq -r '.config.digest' <<< "${multidigest}")
|
||||
else
|
||||
# Otherwise it's multi-arch or has manifest annotations
|
||||
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
||||
# Check for manifest annotations and delete if found
|
||||
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
|
||||
fi
|
||||
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
|
||||
# If there's still more than one digest, it's multi-arch
|
||||
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
|
||||
else
|
||||
# Otherwise it's single arch
|
||||
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
|
||||
fi
|
||||
if digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||
| jq -r 'first(.manifests[].digest)')
|
||||
digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
||||
| jq -r '.config.digest')
|
||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
|
||||
digest=$(jq -r '.config.digest' <<< "${digest}");
|
||||
fi
|
||||
fi
|
||||
image_info=$(curl -sL \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/blobs/${digest}" \
|
||||
| jq -r '.container_config')
|
||||
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
||||
if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then
|
||||
image_info=$(echo $image_info | jq -r '.config')
|
||||
else
|
||||
image_info=$(echo $image_info | jq -r '.container_config')
|
||||
fi
|
||||
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
|
||||
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
||||
if [ -z "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Can't retrieve last pushed version, exiting ****"
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="Can't retrieve last pushed version for kasm tag latest"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
exit 1
|
||||
fi
|
||||
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
||||
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
else
|
||||
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||
echo "**** Attempting to change the Jenkins job description ****"
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for kasm tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if [[ "${artifacts_found}" == "false" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="New version ${EXT_RELEASE} for kasm tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
else
|
||||
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||
if [[ "${artifacts_found}" == "true" ]]; then
|
||||
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for kasm tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
37
.github/workflows/external_trigger_scheduler.yml
vendored
37
.github/workflows/external_trigger_scheduler.yml
vendored
|
|
@ -2,42 +2,47 @@ name: External Trigger Scheduler
|
|||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '03 * * * *'
|
||||
- cron: '33 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
external-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: External Trigger Scheduler
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
echo "**** Pulling the yq docker image ****"
|
||||
docker pull ghcr.io/linuxserver/yq
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
printf "# External trigger scheduler for docker-kasm\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
|
||||
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml \
|
||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||
if [ "$br" == "$ls_branch" ]; then
|
||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||
if [[ "${br}" == "HEAD" ]]; then
|
||||
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
continue
|
||||
fi
|
||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml)
|
||||
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
||||
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
||||
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
||||
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-kasm/actions/workflows/external_trigger.yml/dispatches
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
8
.github/workflows/greetings.yml
vendored
8
.github/workflows/greetings.yml
vendored
|
|
@ -2,12 +2,18 @@ name: Greetings
|
|||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-kasm/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-kasm/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-kasm/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
38
.github/workflows/package_trigger.yml
vendored
38
.github/workflows/package_trigger.yml
vendored
|
|
@ -1,38 +0,0 @@
|
|||
name: Package Trigger Main
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-master:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_KASM_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_KASM_MASTER is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_KASM_MASTER\". ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||
echo "**** Attempting to change the Jenkins job description ****"
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
111
.github/workflows/package_trigger_scheduler.yml
vendored
111
.github/workflows/package_trigger_scheduler.yml
vendored
|
|
@ -2,49 +2,102 @@ name: Package Trigger Scheduler
|
|||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '54 11 * * 0'
|
||||
- cron: '31 21 * * 2'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
package-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Package Trigger Scheduler
|
||||
env:
|
||||
SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }}
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
echo "**** Pulling the yq docker image ****"
|
||||
docker pull ghcr.io/linuxserver/yq
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
printf "# Package trigger scheduler for docker-kasm\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
|
||||
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml \
|
||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||
if [ "${br}" == "${ls_branch}" ]; then
|
||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||
triggered_branches="${triggered_branches}${br} "
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-kasm/actions/workflows/package_trigger.yml/dispatches
|
||||
sleep 30
|
||||
if [[ "${br}" == "HEAD" ]]; then
|
||||
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
continue
|
||||
fi
|
||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml)
|
||||
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/Jenkinsfile >/dev/null 2>&1; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/readme-vars.yml)
|
||||
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif grep -q "^kasm_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`kasm_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
printf "> To disable, add \`kasm_%s\` into the Github organizational variable \`SKIP_PACKAGE_TRIGGER\`.\n\n" "${br}" >> $GITHUB_STEP_SUMMARY
|
||||
triggered_branches="${triggered_branches}${br} "
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
if [[ -z "${response}" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Jenkins build could not be triggered. Skipping branch."
|
||||
continue
|
||||
fi
|
||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||
if ! curl -ifX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Unable to change the Jenkins job description."
|
||||
fi
|
||||
sleep 20
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
done
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) Triggered for kasm** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-kasm/activity/"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
||||
if [[ -n "${triggered_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
||||
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-kasm/activity/ \n"
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
fi
|
||||
if [[ -n "${skipped_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
|
||||
fi
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) for kasm** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
fi
|
||||
|
|
|
|||
12
.github/workflows/permissions.yml
vendored
Normal file
12
.github/workflows/permissions.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
name: Permission check
|
||||
on:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- '**/run'
|
||||
- '**/finish'
|
||||
- '**/check'
|
||||
- 'root/migrations/*'
|
||||
|
||||
jobs:
|
||||
permission_check:
|
||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||
23
.github/workflows/stale.yml
vendored
23
.github/workflows/stale.yml
vendored
|
|
@ -1,23 +0,0 @@
|
|||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
days-before-stale: 30
|
||||
days-before-close: 365
|
||||
exempt-issue-labels: 'awaiting-approval,work-in-progress'
|
||||
exempt-pr-labels: 'awaiting-approval,work-in-progress'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
86
Dockerfile
86
Dockerfile
|
|
@ -1,48 +1,56 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:3.16
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG KASM_VERSION
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="thelamer"
|
||||
LABEL maintainer="thespad"
|
||||
|
||||
# Env
|
||||
ENV DOCKER_TLS_CERTDIR=""
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility"
|
||||
|
||||
# Container setup
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
alpine-sdk \
|
||||
npm && \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
||||
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble 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/stable/deb/nvidia-container-toolkit.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_20.x | bash - && \
|
||||
printf "Package: docker-ce docker-ce-cli docker-ce-rootless-extras\nPin: version 5:28.* \nPin-Priority: 1001" > /etc/apt/preferences.d/docker && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
btrfs-progs \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
docker \
|
||||
docker-cli-compose \
|
||||
build-essential \
|
||||
containerd.io \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
docker-compose-plugin \
|
||||
e2fsprogs \
|
||||
e2fsprogs-extra \
|
||||
findutils \
|
||||
fuse-overlayfs \
|
||||
ip6tables \
|
||||
iproute2 \
|
||||
iptables \
|
||||
jq \
|
||||
lsof \
|
||||
nodejs \
|
||||
nvidia-container-toolkit \
|
||||
openssl \
|
||||
pigz \
|
||||
python3 \
|
||||
shadow-uidmap \
|
||||
sudo \
|
||||
xfsprogs \
|
||||
xz \
|
||||
zfs && \
|
||||
uidmap \
|
||||
xfsprogs && \
|
||||
echo "**** dind setup ****" && \
|
||||
addgroup -S dockremap && \
|
||||
adduser -S -G dockremap dockremap && \
|
||||
useradd -U dockremap && \
|
||||
usermod -G dockremap dockremap && \
|
||||
echo 'dockremap:165536:65536' >> /etc/subuid && \
|
||||
echo 'dockremap:165536:65536' >> /etc/subgid && \
|
||||
curl -o \
|
||||
|
|
@ -56,6 +64,7 @@ RUN \
|
|||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
||||
| jq -r '.name'); \
|
||||
fi && \
|
||||
echo "${KASM_VERSION}" > /version.txt && \
|
||||
curl -o \
|
||||
/tmp/wizard.tar.gz -L \
|
||||
"https://github.com/kasmtech/kasm-install-wizard/archive/refs/tags/${KASM_VERSION}.tar.gz" && \
|
||||
|
|
@ -71,20 +80,39 @@ RUN \
|
|||
tar xf \
|
||||
/tmp/kasm.tar.gz -C \
|
||||
/ && \
|
||||
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
||||
curl -o \
|
||||
/tmp/images.tar.gz -L \
|
||||
"https://kasm-ci.s3.amazonaws.com/${KASM_VERSION}-images-combined.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/images.tar.gz -C \
|
||||
/ && \
|
||||
sed -i \
|
||||
'/alembic_version/s/.*/alembic_version: '${ALVERSION}'/' \
|
||||
/kasm_release/conf/database/seed_data/default_images_a* && \
|
||||
sed -i 's/-N -e -H/-N -B -e -H/g' /kasm_release/upgrade.sh && \
|
||||
echo "exit 0" > /kasm_release/install_dependencies.sh && \
|
||||
/kasm_release/bin/utils/yq_$(uname -m) -i \
|
||||
'.services.proxy.volumes += "/kasm_release/www/img/thumbnails:/srv/www/img/thumbnails"' \
|
||||
/kasm_release/docker/docker-compose-all.yaml && \
|
||||
echo "**** copy assets ****" && \
|
||||
cp \
|
||||
/kasm_release/www/img/thumbnails/*.png \
|
||||
/kasm_release/www/img/thumbnails/*.png /kasm_release/www/img/thumbnails/*.svg \
|
||||
/wizard/public/img/thumbnails/ && \
|
||||
cp \
|
||||
/kasm_release/conf/database/seed_data/default_images_a* \
|
||||
/wizard/ && \
|
||||
useradd -u 70 kasm_db && \
|
||||
useradd kasm && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
apt-get remove -y g++ gcc make && \
|
||||
apt-get -y autoremove && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
/root/.npm \
|
||||
/root/.cache \
|
||||
/tmp/*
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
|
||||
# add init files
|
||||
COPY root/ /
|
||||
|
|
|
|||
|
|
@ -1,48 +1,56 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG KASM_VERSION
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="thelamer"
|
||||
LABEL maintainer="thespad"
|
||||
|
||||
# Env
|
||||
ENV DOCKER_TLS_CERTDIR=""
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility"
|
||||
|
||||
# Container setup
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
alpine-sdk \
|
||||
npm && \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
||||
echo "deb [arch=arm64] https://download.docker.com/linux/ubuntu noble 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/stable/deb/nvidia-container-toolkit.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_20.x | bash - && \
|
||||
printf "Package: docker-ce docker-ce-cli docker-ce-rootless-extras\nPin: version 5:28.* \nPin-Priority: 1001" > /etc/apt/preferences.d/docker && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
btrfs-progs \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
docker \
|
||||
docker-cli-compose \
|
||||
build-essential \
|
||||
containerd.io \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
docker-compose-plugin \
|
||||
e2fsprogs \
|
||||
e2fsprogs-extra \
|
||||
findutils \
|
||||
fuse-overlayfs \
|
||||
ip6tables \
|
||||
iproute2 \
|
||||
iptables \
|
||||
jq \
|
||||
lsof \
|
||||
nodejs \
|
||||
nvidia-container-toolkit \
|
||||
openssl \
|
||||
pigz \
|
||||
python3 \
|
||||
shadow-uidmap \
|
||||
sudo \
|
||||
xfsprogs \
|
||||
xz \
|
||||
zfs && \
|
||||
uidmap \
|
||||
xfsprogs && \
|
||||
echo "**** dind setup ****" && \
|
||||
addgroup -S dockremap && \
|
||||
adduser -S -G dockremap dockremap && \
|
||||
useradd -U dockremap && \
|
||||
usermod -G dockremap dockremap && \
|
||||
echo 'dockremap:165536:65536' >> /etc/subuid && \
|
||||
echo 'dockremap:165536:65536' >> /etc/subgid && \
|
||||
curl -o \
|
||||
|
|
@ -56,6 +64,7 @@ RUN \
|
|||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
||||
| jq -r '.name'); \
|
||||
fi && \
|
||||
echo "${KASM_VERSION}" > /version.txt && \
|
||||
curl -o \
|
||||
/tmp/wizard.tar.gz -L \
|
||||
"https://github.com/kasmtech/kasm-install-wizard/archive/refs/tags/${KASM_VERSION}.tar.gz" && \
|
||||
|
|
@ -71,20 +80,39 @@ RUN \
|
|||
tar xf \
|
||||
/tmp/kasm.tar.gz -C \
|
||||
/ && \
|
||||
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
||||
curl -o \
|
||||
/tmp/images.tar.gz -L \
|
||||
"https://kasm-ci.s3.amazonaws.com/${KASM_VERSION}-images-combined.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/images.tar.gz -C \
|
||||
/ && \
|
||||
sed -i \
|
||||
'/alembic_version/s/.*/alembic_version: '${ALVERSION}'/' \
|
||||
/kasm_release/conf/database/seed_data/default_images_a* && \
|
||||
sed -i 's/-N -e -H/-N -B -e -H/g' /kasm_release/upgrade.sh && \
|
||||
echo "exit 0" > /kasm_release/install_dependencies.sh && \
|
||||
/kasm_release/bin/utils/yq_$(uname -m) -i \
|
||||
'.services.proxy.volumes += "/kasm_release/www/img/thumbnails:/srv/www/img/thumbnails"' \
|
||||
/kasm_release/docker/docker-compose-all.yaml && \
|
||||
echo "**** copy assets ****" && \
|
||||
cp \
|
||||
/kasm_release/www/img/thumbnails/*.png \
|
||||
/kasm_release/www/img/thumbnails/*.png /kasm_release/www/img/thumbnails/*.svg \
|
||||
/wizard/public/img/thumbnails/ && \
|
||||
cp \
|
||||
/kasm_release/conf/database/seed_data/default_images_a* \
|
||||
/wizard/ && \
|
||||
useradd -u 70 kasm_db && \
|
||||
useradd kasm && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
apt-get remove -y g++ gcc make && \
|
||||
apt-get -y autoremove && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
/root/.npm \
|
||||
/root/.cache \
|
||||
/tmp/*
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
|
||||
# add init files
|
||||
COPY root/ /
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG KASM_VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="thelamer"
|
||||
|
||||
# add init files
|
||||
COPY root-armhf/ /
|
||||
1014
Jenkinsfile
vendored
1014
Jenkinsfile
vendored
File diff suppressed because it is too large
Load diff
221
README.md
221
README.md
|
|
@ -1,12 +1,10 @@
|
|||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-kasm/blob/master/.github/CONTRIBUTING.md -->
|
||||
|
||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read https://github.com/linuxserver/docker-kasm/blob/master/.github/CONTRIBUTING.md -->
|
||||
[](https://linuxserver.io)
|
||||
|
||||
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
||||
[](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
|
||||
[](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
|
||||
[](https://discourse.linuxserver.io "post on our community forum.")
|
||||
[](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
|
||||
[](https://github.com/linuxserver "view the source for all of our repositories.")
|
||||
[](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
|
||||
|
||||
|
|
@ -21,15 +19,14 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r
|
|||
Find us at:
|
||||
|
||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
||||
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
|
||||
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
|
||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
||||
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
|
||||
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
||||
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
||||
|
||||
# [linuxserver/kasm](https://github.com/linuxserver/docker-kasm)
|
||||
|
||||
[](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fkasm)
|
||||
[](https://scarf.sh)
|
||||
[](https://github.com/linuxserver/docker-kasm)
|
||||
[](https://github.com/linuxserver/docker-kasm/releases)
|
||||
[](https://github.com/linuxserver/docker-kasm/packages)
|
||||
|
|
@ -48,7 +45,7 @@ The rendering of the graphical-based containers is powered by the open-source pr
|
|||
|
||||
## Supported Architectures
|
||||
|
||||
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
||||
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](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.
|
||||
|
||||
|
|
@ -58,21 +55,15 @@ The architectures supported by this image are:
|
|||
| :----: | :----: | ---- |
|
||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||
| armhf| ❌ | |
|
||||
|
||||
## Version Tags
|
||||
|
||||
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
|
||||
|
||||
| Tag | Available | Description |
|
||||
| :----: | :----: |--- |
|
||||
| latest | ✅ | Stable Kasm releases |
|
||||
| develop | ✅ | Tip of develop |
|
||||
|
||||
## Application Setup
|
||||
|
||||
This container uses [Docker in Docker](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.
|
||||
|
||||
**Unlike other containers the web interface port (default 443) needs to be set for the env variable `KASM_PORT` and both the inside and outside port IE for 4443 `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`**
|
||||
|
||||
Access the installation wizard at https://`your ip`:3000 and follow the instructions there. Once setup is complete access https://`your ip`:443 and login with the credentials you entered during setup. The default users are:
|
||||
|
||||
* admin@kasm.local
|
||||
|
|
@ -80,28 +71,59 @@ Access the installation wizard at https://`your ip`:3000 and follow the instruct
|
|||
|
||||
Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.
|
||||
|
||||
### Updating KASM
|
||||
|
||||
In order to update kasm, first make sure you are using the latest docker image, and then perform the in app update in the admin panel. Docker image update and recreation of container alone won't update kasm.
|
||||
|
||||
### 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 [NVIDIA Container Runtime](https://github.com/NVIDIA/nvidia-container-runtime) installed on the host. Also if using NVIDIA, Kasm Workspaces has [native NVIDIA support](https://www.kasmweb.com/docs/latest/how_to/gpu.html) so you can optionally opt to simply use that instead of he manual override during installation.
|
||||
|
||||
### 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](https://www.kasmweb.com/docs/develop/guide/gamepad_passthrough.html) 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](https://www.kasmweb.com/docs/latest/how_to/persistent_profiles.html).
|
||||
|
||||
### Reverse proxy
|
||||
|
||||
A sample for [SWAG](https://github.com/linuxserver/docker-swag) can be found [here](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](https://www.kasmweb.com/docs/latest/how_to/reverse_proxy.html#update-zones) to launch Workspaces sessions.
|
||||
|
||||
### 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 [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
|
||||
|
||||
## Usage
|
||||
|
||||
Here are some example snippets to help you get started creating a container.
|
||||
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 flaged as 'optional', it is *mandatory* and a value must be provided.
|
||||
|
||||
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "2.1"
|
||||
services:
|
||||
kasm:
|
||||
image: lscr.io/linuxserver/kasm:latest
|
||||
container_name: kasm
|
||||
privileged: true
|
||||
security_opt:
|
||||
- apparmor:rootlesskit #optional
|
||||
environment:
|
||||
- KASM_PORT=443
|
||||
- TZ=Europe/London
|
||||
- DOCKER_HUB_USERNAME=USER #optional
|
||||
- DOCKER_HUB_PASSWORD=PASS #optional
|
||||
- DOCKER_MTU=1500 #optional
|
||||
volumes:
|
||||
- /path/to/data:/opt
|
||||
- /path/to/profiles:/profiles #optional
|
||||
- /path/to/kasm/data:/opt
|
||||
- /path/to/kasm/profiles:/profiles #optional
|
||||
- /dev/input:/dev/input #optional
|
||||
- /run/udev/data:/run/udev/data #optional
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 443:443
|
||||
|
|
@ -114,32 +136,38 @@ services:
|
|||
docker run -d \
|
||||
--name=kasm \
|
||||
--privileged \
|
||||
--security-opt apparmor=rootlesskit `#optional` \
|
||||
-e KASM_PORT=443 \
|
||||
-e TZ=Europe/London \
|
||||
-e DOCKER_HUB_USERNAME=USER `#optional` \
|
||||
-e DOCKER_HUB_PASSWORD=PASS `#optional` \
|
||||
-e DOCKER_MTU=1500 `#optional` \
|
||||
-p 3000:3000 \
|
||||
-p 443:443 \
|
||||
-v /path/to/data:/opt \
|
||||
-v /path/to/profiles:/profiles `#optional` \
|
||||
-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` \
|
||||
--restart unless-stopped \
|
||||
lscr.io/linuxserver/kasm:latest
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
Container images 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.
|
||||
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.
|
||||
|
||||
| Parameter | Function |
|
||||
| :----: | --- |
|
||||
| `-p 3000` | Kasm Installation wizard. (https) |
|
||||
| `-p 443` | Kasm Workspaces interface. (https) |
|
||||
| `-p 3000:3000` | Kasm Installation wizard. (https) |
|
||||
| `-p 443:443` | Kasm Workspaces interface. (https) |
|
||||
| `-e KASM_PORT=443` | Specify the port you bind to the outside for Kasm Workspaces. |
|
||||
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
|
||||
| `-e DOCKER_HUB_USERNAME=USER` | Optionally specify a DockerHub Username to pull private images. |
|
||||
| `-e DOCKER_HUB_PASSWORD=PASS` | Optionally specify a DockerHub password to pull private images. |
|
||||
| `-e DOCKER_MTU=1500` | Optionally specify the mtu options passed to dockerd. |
|
||||
| `-v /opt` | Docker and installation 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. |
|
||||
| `--security-opt apparmor=rootlesskit` | Some hosts require this on top of privileged for namespacing to work properly inside the DinD layer. |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
|
|
@ -148,10 +176,10 @@ You can set any environment variable from a file by using a special prepend `FIL
|
|||
As an example:
|
||||
|
||||
```bash
|
||||
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||||
-e FILE__MYVAR=/run/secrets/mysecretvariable
|
||||
```
|
||||
|
||||
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
||||
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
|
||||
|
||||
## Umask for running applications
|
||||
|
||||
|
|
@ -166,53 +194,101 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
|
|||
|
||||
## Support Info
|
||||
|
||||
* Shell access whilst the container is running: `docker exec -it kasm /bin/bash`
|
||||
* To monitor the logs of the container in realtime: `docker logs -f kasm`
|
||||
* container version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' kasm`
|
||||
* image version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/kasm:latest`
|
||||
* 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 (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
|
||||
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](#application-setup) section above to see if it is recommended for the image.
|
||||
|
||||
Below are the instructions for updating containers:
|
||||
|
||||
### Via Docker Compose
|
||||
|
||||
* Update all images: `docker-compose pull`
|
||||
* or update a single image: `docker-compose pull kasm`
|
||||
* Let compose update all containers as necessary: `docker-compose up -d`
|
||||
* or update a single container: `docker-compose up -d kasm`
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
* 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: `docker pull lscr.io/linuxserver/kasm:latest`
|
||||
* Stop the running container: `docker stop kasm`
|
||||
* Delete the container: `docker rm kasm`
|
||||
* 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: `docker image prune`
|
||||
* You can also remove the old dangling images:
|
||||
|
||||
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
|
||||
|
||||
* Pull the latest image at its tag and replace it with the same env variables in one run:
|
||||
|
||||
```bash
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
containrrr/watchtower \
|
||||
--run-once kasm
|
||||
```
|
||||
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
|
||||
```bash
|
||||
docker image prune
|
||||
```
|
||||
|
||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
||||
|
||||
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
>[!TIP]
|
||||
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
|
||||
## Building locally
|
||||
|
||||
|
|
@ -227,14 +303,27 @@ docker build \
|
|||
-t lscr.io/linuxserver/kasm:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Versions
|
||||
|
||||
* **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.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ release_type: stable
|
|||
release_tag: latest
|
||||
ls_branch: master
|
||||
repo_vars:
|
||||
- EXT_GIT_BRANCH = 'develop'
|
||||
- EXT_USER = 'kasmtech'
|
||||
- EXT_REPO = 'kasm-install-wizard'
|
||||
- BUILD_VERSION_ARG = 'KASM_VERSION'
|
||||
|
|
@ -17,13 +16,13 @@ repo_vars:
|
|||
- DOCKERHUB_IMAGE = 'linuxserver/kasm'
|
||||
- DEV_DOCKERHUB_IMAGE = 'lsiodev/kasm'
|
||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/kasm'
|
||||
- DIST_IMAGE = 'alpine'
|
||||
- DIST_IMAGE = 'ubuntu'
|
||||
- MULTIARCH='true'
|
||||
- CI='true'
|
||||
- CI_WEB='true'
|
||||
- CI_WEB='false'
|
||||
- CI_PORT='3000'
|
||||
- CI_SSL='true'
|
||||
- CI_DELAY='120'
|
||||
- CI_DOCKERENV='TEST=true'
|
||||
- CI_AUTH='user:password'
|
||||
- CI_DOCKERENV=''
|
||||
- CI_AUTH=''
|
||||
- CI_WEBPATH=''
|
||||
|
|
|
|||
1018
package_versions.txt
1018
package_versions.txt
File diff suppressed because it is too large
Load diff
150
readme-vars.yml
150
readme-vars.yml
|
|
@ -6,85 +6,137 @@ project_blurb: |
|
|||
[{{ project_name|capitalize }}]({{ project_url }}) 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 [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc).
|
||||
|
||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||
|
||||
project_blurb_optional_extras_enabled: false
|
||||
project_blurb_optional_extras: []
|
||||
|
||||
project_categories: "Remote Desktop,Business"
|
||||
# supported architectures
|
||||
available_architectures:
|
||||
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||
|
||||
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||
# development version
|
||||
development_versions: true
|
||||
development_versions_items:
|
||||
- { tag: "latest", desc: "Stable Kasm releases" }
|
||||
- { tag: "develop", desc: "Tip of develop" }
|
||||
|
||||
development_versions: false
|
||||
# container parameters
|
||||
common_param_env_vars_enabled: false
|
||||
param_container_name: "{{ project_name }}"
|
||||
|
||||
param_usage_include_net: false
|
||||
|
||||
param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "KASM_PORT", env_value: "443", desc: "Specify the port you bind to the outside for Kasm Workspaces." }
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
|
||||
|
||||
|
||||
- {env_var: "KASM_PORT", env_value: "443", desc: "Specify the port you bind to the outside for Kasm Workspaces."}
|
||||
param_usage_include_vols: true
|
||||
param_volumes:
|
||||
- { vol_path: "/opt", vol_host_path: "/path/to/data", desc: "Docker and installation storage." }
|
||||
|
||||
param_device_map: false
|
||||
param_devices: []
|
||||
|
||||
- {vol_path: "/opt", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Docker and installation storage."}
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "3000", internal_port: "3000", port_desc: "Kasm Installation wizard. (https)" }
|
||||
- { external_port: "443", internal_port: "443", port_desc: "Kasm Workspaces interface. (https)" }
|
||||
|
||||
- {external_port: "3000", internal_port: "3000", port_desc: "Kasm Installation wizard. (https)"}
|
||||
- {external_port: "443", internal_port: "443", port_desc: "Kasm Workspaces interface. (https)"}
|
||||
# optional container parameters
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "DOCKER_HUB_USERNAME", env_value: "USER", desc: "Optionally specify a DockerHub Username to pull private images." }
|
||||
- { env_var: "DOCKER_HUB_PASSWORD", env_value: "PASS", desc: "Optionally specify a DockerHub password to pull private images." }
|
||||
|
||||
- {env_var: "DOCKER_HUB_USERNAME", env_value: "USER", desc: "Optionally specify a DockerHub Username to pull private images."}
|
||||
- {env_var: "DOCKER_HUB_PASSWORD", env_value: "PASS", desc: "Optionally specify a DockerHub password to pull private images."}
|
||||
- {env_var: "DOCKER_MTU", env_value: "1500", desc: "Optionally specify the mtu options passed to dockerd."}
|
||||
opt_param_usage_include_vols: true
|
||||
opt_param_volumes:
|
||||
- { vol_path: "/profiles", vol_host_path: "/path/to/profiles", desc: "Optionally specify a path for persistent profile storage." }
|
||||
|
||||
opt_param_usage_include_ports: false
|
||||
opt_param_ports: []
|
||||
|
||||
opt_param_device_map: false
|
||||
opt_param_devices: []
|
||||
|
||||
cap_add_param: false
|
||||
cap_add_param_vars: []
|
||||
|
||||
opt_cap_add_param: false
|
||||
opt_cap_add_param_vars: []
|
||||
optional_block_1: false
|
||||
optional_block_1_items: ""
|
||||
|
||||
- {vol_path: "/profiles", vol_host_path: "/path/to/{{ project_name }}/profiles", desc: "Optionally specify a path for persistent profile storage."}
|
||||
- {vol_path: "/dev/input", vol_host_path: "/dev/input", desc: "Optional for gamepad support."}
|
||||
- {vol_path: "/run/udev/data", vol_host_path: "/run/udev/data", desc: "Optional for gamepad support."}
|
||||
opt_security_opt_param: true
|
||||
opt_security_opt_param_vars:
|
||||
- {run_var: "apparmor=rootlesskit", compose_var: "apparmor:rootlesskit", desc: "Some hosts require this on top of privileged for namespacing to work properly inside the DinD layer."}
|
||||
unraid_template: false
|
||||
privileged: true
|
||||
|
||||
# application setup block
|
||||
app_setup_block_enabled: true
|
||||
app_setup_block: |
|
||||
This container uses [Docker in Docker](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.
|
||||
|
||||
**Unlike other containers the web interface port (default 443) needs to be set for the env variable `KASM_PORT` and both the inside and outside port IE for 4443 `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`**
|
||||
|
||||
Access the installation wizard at https://`your ip`:3000 and follow the instructions there. Once setup is complete access https://`your ip`:443 and login with the credentials you entered during setup. The default users are:
|
||||
|
||||
* admin@kasm.local
|
||||
* user@kasm.local
|
||||
|
||||
Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.
|
||||
Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.
|
||||
|
||||
### Updating KASM
|
||||
|
||||
In order to update kasm, first make sure you are using the latest docker image, and then perform the in app update in the admin panel. Docker image update and recreation of container alone won't update kasm.
|
||||
|
||||
### 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 [NVIDIA Container Runtime](https://github.com/NVIDIA/nvidia-container-runtime) installed on the host. Also if using NVIDIA, Kasm Workspaces has [native NVIDIA support](https://www.kasmweb.com/docs/latest/how_to/gpu.html) so you can optionally opt to simply use that instead of he manual override during installation.
|
||||
|
||||
### 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](https://www.kasmweb.com/docs/develop/guide/gamepad_passthrough.html) 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](https://www.kasmweb.com/docs/latest/how_to/persistent_profiles.html).
|
||||
|
||||
### Reverse proxy
|
||||
|
||||
A sample for [SWAG](https://github.com/linuxserver/docker-swag) can be found [here](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](https://www.kasmweb.com/docs/latest/how_to/reverse_proxy.html#update-zones) to launch Workspaces sessions.
|
||||
# init diagram
|
||||
init_diagram: |
|
||||
"kasm:latest": {
|
||||
docker-mods
|
||||
base {
|
||||
fix-attr +\nlegacy cont-init
|
||||
}
|
||||
docker-mods -> base
|
||||
legacy-services
|
||||
custom services
|
||||
init-services -> legacy-services
|
||||
init-services -> custom services
|
||||
custom services -> legacy-services
|
||||
legacy-services -> ci-service-check
|
||||
init-migrations -> init-adduser
|
||||
init-os-end -> init-config
|
||||
init-config -> init-config-end
|
||||
init-config-kasm -> init-config-end
|
||||
init-crontab-config -> init-config-end
|
||||
init-config -> init-config-kasm
|
||||
init-config -> init-crontab-config
|
||||
init-mods-end -> init-custom-files
|
||||
init-adduser -> init-device-perms
|
||||
base -> init-envfile
|
||||
base -> init-migrations
|
||||
init-config-end -> init-mods
|
||||
init-mods-package-install -> init-mods-end
|
||||
init-mods -> init-mods-package-install
|
||||
init-adduser -> init-os-end
|
||||
init-device-perms -> init-os-end
|
||||
init-envfile -> init-os-end
|
||||
init-custom-files -> init-services
|
||||
init-services -> svc-cron
|
||||
svc-cron -> legacy-services
|
||||
init-config-kasm -> svc-docker
|
||||
init-services -> svc-docker
|
||||
svc-docker -> legacy-services
|
||||
init-config-kasm -> svc-kasm-wizard
|
||||
init-services -> svc-kasm-wizard
|
||||
svc-kasm-wizard -> legacy-services
|
||||
}
|
||||
Base Images: {
|
||||
"baseimage-ubuntu:noble"
|
||||
}
|
||||
"kasm:latest" <- Base Images
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "02.07.22:", desc: "Initial Release." }
|
||||
- {date: "13.11.25:", desc: "Pin docker to v28 to avoid API deprecation issues."}
|
||||
- {date: "22.10.25:", desc: "Update for 1.18.0 release."}
|
||||
- {date: "08.06.25:", desc: "Deprecate develop branch."}
|
||||
- {date: "03.06.25:", desc: "Rebase to Ubuntu Noble. Update for 1.17.0 release."}
|
||||
- {date: "09.11.24:", desc: "Update base image for 1.16.1 release."}
|
||||
- {date: "24.09.24:", desc: "Add base users in docker build logic to survive container upgrades."}
|
||||
- {date: "17.09.24:", desc: "Update base image for 1.16.0 release and fix Nvidia support."}
|
||||
- {date: "16.02.24:", desc: "Update base image for 1.15.0 release."}
|
||||
- {date: "22.08.23:", desc: "Update base image for 1.14.0 release."}
|
||||
- {date: "07.04.23:", desc: "Add mod layer for ingesting LSIO images for 1.13.0 release."}
|
||||
- {date: "28.03.23:", desc: "Pin compose to 2.5.0 to be in sync with upstream requirements."}
|
||||
- {date: "05.11.22:", desc: "Rebase to Jammy, add support for GPUs, add support for Gamepads."}
|
||||
- {date: "23.09.22:", desc: "Migrate to s6v3."}
|
||||
- {date: "02.07.22:", desc: "Initial Release."}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
for i in {1..10}; do
|
||||
echo "Armhf/Arm32v7 is not supported"
|
||||
done
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Create directories
|
||||
if [ ! -d "/opt/docker" ]; then
|
||||
mkdir -p /opt/docker
|
||||
fi
|
||||
|
||||
# Login to Dockerhub
|
||||
if [ ! -z "${DOCKER_HUB_USERNAME}" ]; then
|
||||
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
fi
|
||||
|
||||
# Generate self cert for wizard
|
||||
if [ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]; then
|
||||
mkdir -p /opt/kasm/certs
|
||||
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
||||
-keyout /opt/kasm/certs/kasm_wizard.key \
|
||||
-out /opt/kasm/certs/kasm_wizard.crt \
|
||||
-subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=$(hostname)/emailAddress=none@none.none"
|
||||
fi
|
||||
8
root/etc/docker/daemon.json
Normal file
8
root/etc/docker/daemon.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"runtimes": {
|
||||
"nvidia": {
|
||||
"args": [],
|
||||
"path": "nvidia-container-runtime"
|
||||
}
|
||||
}
|
||||
}
|
||||
31
root/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Executable file
31
root/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Create directories
|
||||
if [[ ! -d "/opt/docker" ]]; then
|
||||
mkdir -p /opt/docker
|
||||
fi
|
||||
|
||||
# Workaround for running in a rootless docker environment
|
||||
sed -i '/set -e/d' /etc/init.d/docker
|
||||
|
||||
# Login to Dockerhub
|
||||
if [[ -n "${DOCKER_HUB_USERNAME}" ]]; then
|
||||
docker login --username "${DOCKER_HUB_USERNAME}" --password "${DOCKER_HUB_PASSWORD}"
|
||||
fi
|
||||
|
||||
# Generate self cert for wizard
|
||||
if [[ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]]; then
|
||||
mkdir -p /opt/kasm/certs
|
||||
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
||||
-keyout /opt/kasm/certs/kasm_wizard.key \
|
||||
-out /opt/kasm/certs/kasm_wizard.crt \
|
||||
-subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=$(hostname)/emailAddress=none@none.none"
|
||||
fi
|
||||
|
||||
# Create plugin directory
|
||||
if [[ ! -L "/var/lib/docker-plugins" ]]; then
|
||||
mkdir -p /opt/docker-plugins
|
||||
ln -s /opt/docker-plugins /var/lib/docker-plugins
|
||||
mkdir -p /var/lib/docker-plugins/rclone/config
|
||||
mkdir -p /var/lib/docker-plugins/rclone/cache
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-config-kasm/run
|
||||
14
root/etc/s6-overlay/s6-rc.d/svc-docker/run
Executable file
14
root/etc/s6-overlay/s6-rc.d/svc-docker/run
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
_term() {
|
||||
if [ -f "/opt/kasm/bin/stop" ]; then
|
||||
echo "Caught SIGTERM signal!"
|
||||
echo "Stopping Kasm Containers"
|
||||
/opt/kasm/bin/stop
|
||||
pid=$(pidof stop)
|
||||
# terminate when the stop process dies
|
||||
tail --pid=${pid} -f /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
exec /usr/local/bin/dockerd-entrypoint.sh -l error --data-root /opt/docker
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-docker/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-docker/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
17
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/run
Executable file
17
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/run
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Wait for docker to be up
|
||||
while true; do
|
||||
if [[ -S "/var/run/docker.sock" ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Don't do anything if wizard is disabled
|
||||
if [[ -f "/opt/NO_WIZARD" ]]; then
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
cd /wizard || exit 1
|
||||
/usr/bin/node index.js
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
0
root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-docker
Normal file
0
root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-docker
Normal file
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
_term() {
|
||||
if [ -f "/opt/kasm/bin/stop" ]; then
|
||||
echo "Caught SIGTERM signal!"
|
||||
echo "Stopping Kasm Containers"
|
||||
/opt/kasm/bin/stop
|
||||
pid=$(pidof stop)
|
||||
# terminate when the stop process dies
|
||||
tail --pid=${pid} -f /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
exec /usr/local/bin/dockerd-entrypoint.sh -l error --data-root /opt/docker
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Wait for docker to be up
|
||||
while true; do
|
||||
if [ -S "/var/run/docker.sock" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
cd /wizard
|
||||
/usr/bin/node index.js
|
||||
28
root/gpuinfo.sh
Executable file
28
root/gpuinfo.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Get list of drm devices
|
||||
IFS=$'\n'
|
||||
CARDS=$(ls -la /sys/class/drm/renderD*/device/driver 2>/dev/null | awk '{print $11}' | awk -F/ '{print $NF}')
|
||||
if [ -z "$CARDS" ]; then
|
||||
echo '{}'
|
||||
exit 0
|
||||
fi
|
||||
for CARD in ${CARDS}; do
|
||||
LAST_CARD=${CARD}
|
||||
done
|
||||
|
||||
# Add them to the json string
|
||||
JSON='{'
|
||||
COUNTER=0
|
||||
for CARD in $CARDS; do
|
||||
JSON="${JSON}\"/dev/dri/card$COUNTER\":\"${CARD^^}\""
|
||||
if [ ${CARD} == ${LAST_CARD} ]; then
|
||||
JSON="${JSON}}"
|
||||
else
|
||||
JSON="${JSON},"
|
||||
fi
|
||||
COUNTER=$(( COUNTER + 1 ))
|
||||
done
|
||||
|
||||
# Print json string
|
||||
echo $JSON
|
||||
|
|
@ -116,6 +116,7 @@ if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
|||
; then
|
||||
# generate certs and use TLS if requested/possible (default in 19.03+)
|
||||
set -- dockerd \
|
||||
--mtu="${DOCKER_MTU:-1500}" \
|
||||
--host="$dockerSocket" \
|
||||
--host=tcp://0.0.0.0:2376 \
|
||||
--tlsverify \
|
||||
|
|
@ -127,6 +128,7 @@ if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
|||
else
|
||||
# TLS disabled (-e DOCKER_TLS_CERTDIR='') or missing certs
|
||||
set -- dockerd \
|
||||
--mtu="${DOCKER_MTU:-1500}" \
|
||||
--host="$dockerSocket" \
|
||||
"$@"
|
||||
DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} -p 0.0.0.0:2375:2375/tcp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue