mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2026-01-23 09:11:07 +01:00
Compare commits
195 Commits
4.16.1-ls1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09d8b7a4e1 | ||
|
|
b01eb3400e | ||
|
|
a28f241993 | ||
|
|
0a749f992d | ||
|
|
b576c63da2 | ||
|
|
5dce046d6a | ||
|
|
21a9776532 | ||
|
|
0ffc040498 | ||
|
|
0099a5ec1d | ||
|
|
f1390d0729 | ||
|
|
02020676c8 | ||
|
|
4a8f4ae142 | ||
|
|
59758287cf | ||
|
|
35407446e6 | ||
|
|
022b13b69c | ||
|
|
71811615a3 | ||
|
|
dd44d039a9 | ||
|
|
364de01076 | ||
|
|
b188f00f8b | ||
|
|
9a24cfbba8 | ||
|
|
4484b11aaf | ||
|
|
748dbf9082 | ||
|
|
9cb5782e8a | ||
|
|
f49c8f0fe6 | ||
|
|
6c2a4014a1 | ||
|
|
236e751721 | ||
|
|
e9f4337417 | ||
|
|
7a2065c171 | ||
|
|
ca3c2c9cf7 | ||
|
|
300e85d3e2 | ||
|
|
b5d20f6114 | ||
|
|
fca71a0de1 | ||
|
|
6a9f6ebcb5 | ||
|
|
b94352e411 | ||
|
|
cfa4070fea | ||
|
|
5779273123 | ||
|
|
0479e81563 | ||
|
|
e204bcaef6 | ||
|
|
0e1e48d5cd | ||
|
|
455407219e | ||
|
|
9d79e61c06 | ||
|
|
87f961f038 | ||
|
|
6bd0ebb31e | ||
|
|
9d95aadf89 | ||
|
|
8c14b46231 | ||
|
|
8c12be9378 | ||
|
|
a0a1ba58ee | ||
|
|
f58e3ebccc | ||
|
|
eeb8afd54d | ||
|
|
c0b66f3246 | ||
|
|
9f8ec8013e | ||
|
|
2a36656096 | ||
|
|
e92931416b | ||
|
|
6b64e1e967 | ||
|
|
a7294dfb09 | ||
|
|
a7e2b20ca2 | ||
|
|
badac0c5f0 | ||
|
|
e14c470234 | ||
|
|
ab481ce6bc | ||
|
|
94234a1ca5 | ||
|
|
86f281df7f | ||
|
|
1a7ac378ce | ||
|
|
18bb3a0a15 | ||
|
|
872ad28cf9 | ||
|
|
9ff9e0e278 | ||
|
|
ef615610d8 | ||
|
|
26c5bcdf4c | ||
|
|
217394f526 | ||
|
|
1d27cf19a1 | ||
|
|
80f0a2e7e4 | ||
|
|
5043417a4d | ||
|
|
ffb5c043c9 | ||
|
|
ca4c5bed15 | ||
|
|
3e6d99c27b | ||
|
|
88c91e4deb | ||
|
|
5b0b23e69d | ||
|
|
71c25ef875 | ||
|
|
33620aee5d | ||
|
|
b1cfb51e38 | ||
|
|
92bd8e4210 | ||
|
|
f9b1b1a41c | ||
|
|
2f251a6467 | ||
|
|
3e6f60e25b | ||
|
|
f4303f45ff | ||
|
|
728a7ba961 | ||
|
|
d986190b53 | ||
|
|
1de0da63d4 | ||
|
|
f9a2fd5adf | ||
|
|
7141d7b5c7 | ||
|
|
09932d59c7 | ||
|
|
2ab1bf003d | ||
|
|
6605ffcef0 | ||
|
|
d298bf329e | ||
|
|
e9aa49ab57 | ||
|
|
10a8b3c67f | ||
|
|
c2a6879aca | ||
|
|
41840acd83 | ||
|
|
11b51b887c | ||
|
|
8d59f25d59 | ||
|
|
bdf6dff22a | ||
|
|
b0a6736fa3 | ||
|
|
0ee7309dc4 | ||
|
|
fcf9fcbb7f | ||
|
|
42aae8bde4 | ||
|
|
b0f61803a2 | ||
|
|
1f80e77050 | ||
|
|
e257643459 | ||
|
|
9e1a9d20ce | ||
|
|
7dca337bb0 | ||
|
|
7c25130ab6 | ||
|
|
5d552aed5a | ||
|
|
75a90080f5 | ||
|
|
f6011c3ba5 | ||
|
|
b03635eaec | ||
|
|
575ef50b06 | ||
|
|
c0aa0f7fc4 | ||
|
|
7579ec248a | ||
|
|
894f3b2c0c | ||
|
|
f8b2e10867 | ||
|
|
f86741a4c9 | ||
|
|
11dbec9f82 | ||
|
|
86227b0e2d | ||
|
|
f6e7d4e563 | ||
|
|
3b59cd4197 | ||
|
|
deb7a4925c | ||
|
|
f203d3a7c1 | ||
|
|
9b20246cde | ||
|
|
9ca15d0f9d | ||
|
|
e4b105a61a | ||
|
|
218becb211 | ||
|
|
92e9eab4d5 | ||
|
|
89eb9d7478 | ||
|
|
0e9479744a | ||
|
|
8ba6ad1f09 | ||
|
|
3021ba30a7 | ||
|
|
1135a516fb | ||
|
|
a7e1890e72 | ||
|
|
64defa8774 | ||
|
|
d4a60059b5 | ||
|
|
a43c086ca2 | ||
|
|
6ee4ad2cae | ||
|
|
970ccd8ad0 | ||
|
|
7e9c990b0e | ||
|
|
b5003b3fcb | ||
|
|
d29b22e87d | ||
|
|
722941437f | ||
|
|
5a956a2027 | ||
|
|
747361b094 | ||
|
|
7100957e39 | ||
|
|
775affa6bf | ||
|
|
7929311233 | ||
|
|
eaeab3349e | ||
|
|
ff420fc155 | ||
|
|
818d5ade66 | ||
|
|
1d46aa716e | ||
|
|
17570939d5 | ||
|
|
0c5f0c4a76 | ||
|
|
73811e24e4 | ||
|
|
309d28852d | ||
|
|
67773aa923 | ||
|
|
b18e8877ad | ||
|
|
48262b8882 | ||
|
|
d2a5ef414a | ||
|
|
4931dd3b82 | ||
|
|
2d7ee3529b | ||
|
|
33e0d230c9 | ||
|
|
7d835391a9 | ||
|
|
3ce9c4e675 | ||
|
|
d6dbb82493 | ||
|
|
94e137e87f | ||
|
|
a9df15473e | ||
|
|
24919c86a2 | ||
|
|
a121f3a64a | ||
|
|
33e35e89b8 | ||
|
|
5e7e1b2bda | ||
|
|
4bfbc226a4 | ||
|
|
9c28be3eb4 | ||
|
|
dac826bc40 | ||
|
|
7e16b5c8be | ||
|
|
14c35108cf | ||
|
|
4dcc194840 | ||
|
|
71158be6b3 | ||
|
|
02a7bea1b8 | ||
|
|
b15152a498 | ||
|
|
18889ecd4b | ||
|
|
44345df372 | ||
|
|
64a00a9744 | ||
|
|
31e2f77d49 | ||
|
|
b03eace8f8 | ||
|
|
7912c721a5 | ||
|
|
bccc62b708 | ||
|
|
25396b74d1 | ||
|
|
cf4c57cd1e | ||
|
|
6d2cacc4c8 | ||
|
|
75e67677ed |
0
.editorconfig
Executable file → Normal file
0
.editorconfig
Executable file → Normal file
6
.github/CONTRIBUTING.md
vendored
Executable file → Normal file
6
.github/CONTRIBUTING.md
vendored
Executable file → Normal file
@ -6,7 +6,7 @@
|
|||||||
* Read, and fill the Pull Request template
|
* 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 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 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
|
## Common files
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ docker build \
|
|||||||
-t linuxserver/code-server:latest .
|
-t linuxserver/code-server: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
|
```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`.
|
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||||
|
|||||||
0
.github/FUNDING.yml
vendored
Executable file → Normal file
0
.github/FUNDING.yml
vendored
Executable file → Normal file
2
.github/ISSUE_TEMPLATE/config.yml
vendored
Executable file → Normal file
2
.github/ISSUE_TEMPLATE/config.yml
vendored
Executable file → Normal file
@ -1,7 +1,7 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Discord chat support
|
- name: Discord chat support
|
||||||
url: https://discord.gg/YWrKVTn
|
url: https://linuxserver.io/discord
|
||||||
about: Realtime support / chat with the community and the team.
|
about: Realtime support / chat with the community and the team.
|
||||||
|
|
||||||
- name: Discourse discussion forum
|
- name: Discourse discussion forum
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Executable file → Normal file
4
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Executable file → Normal file
@ -67,10 +67,10 @@ body:
|
|||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
description: |
|
description: |
|
||||||
Provide a full docker log, output of "docker logs linuxserver.io"
|
Provide a full docker log, output of "docker logs code-server"
|
||||||
label: Container logs
|
label: Container logs
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Output of `docker logs linuxserver.io`
|
Output of `docker logs code-server`
|
||||||
render: bash
|
render: bash
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
0
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Executable file → Normal file
3
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file → Normal file
3
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file → Normal file
@ -8,6 +8,9 @@ on:
|
|||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted,edited,dismissed]
|
types: [submitted,edited,dismissed]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
manage-project:
|
manage-project:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
3
.github/workflows/call_issues_cron.yml
vendored
Executable file → Normal file
3
.github/workflows/call_issues_cron.yml
vendored
Executable file → Normal file
@ -4,6 +4,9 @@ on:
|
|||||||
- cron: '31 1 * * *'
|
- cron: '31 1 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
145
.github/workflows/external_trigger.yml
vendored
145
.github/workflows/external_trigger.yml
vendored
@ -3,26 +3,42 @@ name: External Trigger Main
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
external-trigger-master:
|
external-trigger-master:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.1.0
|
- uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: External Trigger
|
- name: External Trigger
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
env:
|
||||||
|
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
printf "# External trigger for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
if grep -q "^code-server_master_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||||
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`code-server_master_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
||||||
|
elif grep -q "^code-server_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||||
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`code-server_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
|
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
|
echo "> External trigger running off of master branch. To disable this trigger, add \`code-server_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Retrieving external version ****"
|
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/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||')
|
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||')
|
||||||
|
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
|
||||||
|
if grep -q "^code-server_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
|
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 code-server branch master"
|
FAILURE_REASON="Can't retrieve external version for code-server branch master"
|
||||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-code-server/actions/runs/${{ github.run_id }}"
|
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-code-server/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,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||||
@ -30,25 +46,43 @@ jobs:
|
|||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||||
echo "**** External version: ${EXT_RELEASE} ****"
|
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "External version: ${EXT_RELEASE}" >> $GITHUB_STEP_SUMMARY
|
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Retrieving last pushed version ****"
|
|
||||||
image="linuxserver/code-server"
|
image="linuxserver/code-server"
|
||||||
tag="latest"
|
tag="latest"
|
||||||
token=$(curl -sX GET \
|
token=$(curl -sX GET \
|
||||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fcode-server%3Apull" \
|
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fcode-server%3Apull" \
|
||||||
| jq -r '.token')
|
| 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.docker.distribution.manifest.v2+json" \
|
||||||
|
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
|
||||||
--header "Authorization: Bearer ${token}" \
|
--header "Authorization: Bearer ${token}" \
|
||||||
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
|
||||||
| jq -r 'first(.manifests[].digest)')
|
digest=$(jq -r '.config.digest' <<< "${digest}");
|
||||||
digest=$(curl -s \
|
fi
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
fi
|
||||||
--header "Authorization: Bearer ${token}" \
|
|
||||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
|
||||||
| jq -r '.config.digest')
|
|
||||||
image_info=$(curl -sL \
|
image_info=$(curl -sL \
|
||||||
--header "Authorization: Bearer ${token}" \
|
--header "Authorization: Bearer ${token}" \
|
||||||
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
||||||
@ -60,45 +94,54 @@ jobs:
|
|||||||
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
|
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
|
||||||
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
||||||
if [ -z "${IMAGE_VERSION}" ]; then
|
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 code-server tag latest"
|
FAILURE_REASON="Can't retrieve last pushed version for code-server tag latest"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
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"}],
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Last pushed version: ${IMAGE_VERSION}" >> $GITHUB_STEP_SUMMARY
|
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
|
||||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
|
||||||
echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
exit 0
|
||||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/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
|
||||||
echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
if [[ "${artifacts_found}" == "false" ]]; then
|
||||||
echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
response=$(curl -iX POST \
|
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
FAILURE_REASON="New version ${EXT_RELEASE} for code-server tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||||
echo "**** Sleeping 10 seconds until job starts ****"
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
sleep 10
|
else
|
||||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
buildurl="${buildurl%$'\r'}"
|
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
if [[ "${artifacts_found}" == "true" ]]; then
|
||||||
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Attempting to change the Jenkins job description ****"
|
fi
|
||||||
curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||||
--data-urlencode "Submit=Submit"
|
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Notifying Discord ****"
|
sleep 10
|
||||||
TRIGGER_REASON="A version change was detected for code-server tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
buildurl="${buildurl%$'\r'}"
|
||||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
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 code-server 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
|
fi
|
||||||
|
|||||||
29
.github/workflows/external_trigger_scheduler.yml
vendored
29
.github/workflows/external_trigger_scheduler.yml
vendored
@ -5,41 +5,44 @@ on:
|
|||||||
- cron: '32 * * * *'
|
- cron: '32 * * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
external-trigger-scheduler:
|
external-trigger-scheduler:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.1.0
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: External Trigger Scheduler
|
- name: External Trigger Scheduler
|
||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
printf "# External trigger scheduler for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
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:short)' refs/remotes)
|
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||||
do
|
do
|
||||||
br=$(echo "$br" | sed 's|origin/||g')
|
if [[ "${br}" == "HEAD" ]]; then
|
||||||
echo "**** Evaluating branch ${br} ****"
|
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-code-server/${br}/jenkins-vars.yml)
|
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml)
|
||||||
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
||||||
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
||||||
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
||||||
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
|
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-code-server/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${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
|
||||||
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||||
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/external_trigger.yml/dispatches
|
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/external_trigger.yml/dispatches
|
||||||
else
|
else
|
||||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "**** ${br} is either a dev branch, or has no external version; skipping trigger. ****"
|
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Skipping branch ${br} due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
6
.github/workflows/greetings.yml
vendored
Executable file → Normal file
6
.github/workflows/greetings.yml
vendored
Executable file → Normal file
@ -2,8 +2,14 @@ name: Greetings
|
|||||||
|
|
||||||
on: [pull_request_target, issues]
|
on: [pull_request_target, issues]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
greeting:
|
greeting:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
|
|||||||
42
.github/workflows/package_trigger.yml
vendored
42
.github/workflows/package_trigger.yml
vendored
@ -1,42 +0,0 @@
|
|||||||
name: Package Trigger Main
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
package-trigger-master:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.1.0
|
|
||||||
|
|
||||||
- name: Package Trigger
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
run: |
|
|
||||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
|
||||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
|
||||||
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
|
||||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
|
||||||
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\". ****"
|
|
||||||
echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
|
|
||||||
response=$(curl -iX POST \
|
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/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 "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
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"
|
|
||||||
107
.github/workflows/package_trigger_scheduler.yml
vendored
107
.github/workflows/package_trigger_scheduler.yml
vendored
@ -5,46 +5,99 @@ on:
|
|||||||
- cron: '0 20 * * 6'
|
- cron: '0 20 * * 6'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package-trigger-scheduler:
|
package-trigger-scheduler:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.1.0
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Package Trigger Scheduler
|
- name: Package Trigger Scheduler
|
||||||
|
env:
|
||||||
|
SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }}
|
||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
printf "# Package trigger scheduler for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
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:short)' refs/remotes)
|
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||||
do
|
do
|
||||||
br=$(echo "$br" | sed 's|origin/||g')
|
if [[ "${br}" == "HEAD" ]]; then
|
||||||
echo "**** Evaluating branch ${br} ****"
|
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml | yq -r '.ls_branch')
|
continue
|
||||||
if [ "${br}" == "${ls_branch}" ]; then
|
fi
|
||||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml)
|
||||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/Jenkinsfile >/dev/null 2>&1; then
|
||||||
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
triggered_branches="${triggered_branches}${br} "
|
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
|
||||||
curl -iX POST \
|
skipped_branches="${skipped_branches}${br} "
|
||||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/readme-vars.yml)
|
||||||
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/package_trigger.yml/dispatches
|
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
|
||||||
sleep 30
|
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 "^code-server_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
|
||||||
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`code-server_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
|
skipped_branches="${skipped_branches}${br} "
|
||||||
|
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/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
|
else
|
||||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
printf "> To disable, add \`code-server_%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-code-server/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
|
fi
|
||||||
else
|
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
|
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
||||||
echo "**** Notifying Discord ****"
|
if [[ -n "${triggered_branches}" ]]; then
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
||||||
"description": "**Package Check Build(s) Triggered for code-server** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-code-server/activity/"' \n"}],
|
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-code-server/activity/ \n"
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
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 code-server** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
fi
|
||||||
|
|||||||
2
.github/workflows/permissions.yml
vendored
Executable file → Normal file
2
.github/workflows/permissions.yml
vendored
Executable file → Normal file
@ -5,6 +5,8 @@ on:
|
|||||||
- '**/run'
|
- '**/run'
|
||||||
- '**/finish'
|
- '**/finish'
|
||||||
- '**/check'
|
- '**/check'
|
||||||
|
- 'root/migrations/*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
permission_check:
|
permission_check:
|
||||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -16,11 +18,9 @@ RUN \
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
jq \
|
|
||||||
libatomic1 \
|
libatomic1 \
|
||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
|
||||||
sudo && \
|
sudo && \
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
@ -33,6 +33,7 @@ RUN \
|
|||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
||||||
tar xf /tmp/code-server.tar.gz -C \
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
/app/code-server --strip-components=1 && \
|
/app/code-server --strip-components=1 && \
|
||||||
|
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -16,11 +18,9 @@ RUN \
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
jq \
|
|
||||||
libatomic1 \
|
libatomic1 \
|
||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
|
||||||
sudo && \
|
sudo && \
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
@ -33,6 +33,7 @@ RUN \
|
|||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
|
||||||
tar xf /tmp/code-server.tar.gz -C \
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
/app/code-server --strip-components=1 && \
|
/app/code-server --strip-components=1 && \
|
||||||
|
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|||||||
775
Jenkinsfile
vendored
775
Jenkinsfile
vendored
File diff suppressed because it is too large
Load Diff
191
README.md
191
README.md
@ -1,12 +1,10 @@
|
|||||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||||
<!-- Please read the https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
|
<!-- Please read https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
|
||||||
|
|
||||||
[](https://linuxserver.io)
|
[](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://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://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://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")
|
[](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:
|
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!
|
* [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.
|
* [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.
|
* [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
|
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
||||||
|
|
||||||
# [linuxserver/code-server](https://github.com/linuxserver/docker-code-server)
|
# [linuxserver/code-server](https://github.com/linuxserver/docker-code-server)
|
||||||
|
|
||||||
[](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fcode-server)
|
[](https://scarf.sh)
|
||||||
[](https://github.com/linuxserver/docker-code-server)
|
[](https://github.com/linuxserver/docker-code-server)
|
||||||
[](https://github.com/linuxserver/docker-code-server/releases)
|
[](https://github.com/linuxserver/docker-code-server/releases)
|
||||||
[](https://github.com/linuxserver/docker-code-server/packages)
|
[](https://github.com/linuxserver/docker-code-server/packages)
|
||||||
@ -52,7 +49,7 @@ Find us at:
|
|||||||
|
|
||||||
## Supported Architectures
|
## 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/code-server:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
Simply pulling `lscr.io/linuxserver/code-server:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||||
|
|
||||||
@ -62,7 +59,6 @@ The architectures supported by this image are:
|
|||||||
| :----: | :----: | ---- |
|
| :----: | :----: | ---- |
|
||||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||||
| armhf | ❌ | |
|
|
||||||
|
|
||||||
## Application Setup
|
## Application Setup
|
||||||
|
|
||||||
@ -79,15 +75,34 @@ git config --global user.email "email address"
|
|||||||
|
|
||||||
How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
|
How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
|
||||||
|
|
||||||
|
## Read-Only Operation
|
||||||
|
|
||||||
|
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
|
||||||
|
|
||||||
|
### Caveats
|
||||||
|
|
||||||
|
* `/tmp` must be mounted to tmpfs
|
||||||
|
* `sudo` will not be available
|
||||||
|
|
||||||
|
## Non-Root Operation
|
||||||
|
|
||||||
|
This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).
|
||||||
|
|
||||||
|
### Caveats
|
||||||
|
|
||||||
|
* `sudo` will not be available
|
||||||
|
|
||||||
## Usage
|
## 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))
|
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
version: "2.1"
|
|
||||||
services:
|
services:
|
||||||
code-server:
|
code-server:
|
||||||
image: lscr.io/linuxserver/code-server:latest
|
image: lscr.io/linuxserver/code-server:latest
|
||||||
@ -102,8 +117,9 @@ services:
|
|||||||
- SUDO_PASSWORD_HASH= #optional
|
- SUDO_PASSWORD_HASH= #optional
|
||||||
- PROXY_DOMAIN=code-server.my.domain #optional
|
- PROXY_DOMAIN=code-server.my.domain #optional
|
||||||
- DEFAULT_WORKSPACE=/config/workspace #optional
|
- DEFAULT_WORKSPACE=/config/workspace #optional
|
||||||
|
- PWA_APPNAME=code-server #optional
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/appdata/config:/config
|
- /path/to/code-server/config:/config
|
||||||
ports:
|
ports:
|
||||||
- 8443:8443
|
- 8443:8443
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@ -123,20 +139,20 @@ docker run -d \
|
|||||||
-e SUDO_PASSWORD_HASH= `#optional` \
|
-e SUDO_PASSWORD_HASH= `#optional` \
|
||||||
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
|
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
|
||||||
-e DEFAULT_WORKSPACE=/config/workspace `#optional` \
|
-e DEFAULT_WORKSPACE=/config/workspace `#optional` \
|
||||||
|
-e PWA_APPNAME=code-server `#optional` \
|
||||||
-p 8443:8443 \
|
-p 8443:8443 \
|
||||||
-v /path/to/appdata/config:/config \
|
-v /path/to/code-server/config:/config \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
lscr.io/linuxserver/code-server:latest
|
lscr.io/linuxserver/code-server:latest
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## 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 |
|
| Parameter | Function |
|
||||||
| :----: | --- |
|
| :----: | --- |
|
||||||
| `-p 8443` | web gui |
|
| `-p 8443:8443` | web gui |
|
||||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||||
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
|
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
|
||||||
@ -144,9 +160,12 @@ Container images are configured using parameters passed at runtime (such as thos
|
|||||||
| `-e HASHED_PASSWORD=` | Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below. |
|
| `-e HASHED_PASSWORD=` | Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below. |
|
||||||
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
|
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
|
||||||
| `-e SUDO_PASSWORD_HASH=` | Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`. |
|
| `-e SUDO_PASSWORD_HASH=` | Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`. |
|
||||||
| `-e PROXY_DOMAIN=code-server.my.domain` | If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains) |
|
| `-e PROXY_DOMAIN=code-server.my.domain` | If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/coder/code-server/blob/main/docs/guide.md#using-a-subdomain) |
|
||||||
| `-e DEFAULT_WORKSPACE=/config/workspace` | If this optional variable is set, code-server will open this directory by default |
|
| `-e DEFAULT_WORKSPACE=/config/workspace` | If this optional variable is set, code-server will open this directory by default |
|
||||||
|
| `-e PWA_APPNAME=code-server` | If this optional variable is set, the PWA app will the specified name. |
|
||||||
| `-v /config` | Contains all relevant configuration files. |
|
| `-v /config` | Contains all relevant configuration files. |
|
||||||
|
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
|
||||||
|
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |
|
||||||
|
|
||||||
## Environment variables from files (Docker secrets)
|
## Environment variables from files (Docker secrets)
|
||||||
|
|
||||||
@ -155,10 +174,10 @@ You can set any environment variable from a file by using a special prepend `FIL
|
|||||||
As an example:
|
As an example:
|
||||||
|
|
||||||
```bash
|
```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
|
## Umask for running applications
|
||||||
|
|
||||||
@ -167,15 +186,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
|
|||||||
|
|
||||||
## User / Group Identifiers
|
## User / Group Identifiers
|
||||||
|
|
||||||
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
|
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
|
||||||
|
|
||||||
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
|
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
|
||||||
|
|
||||||
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
|
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ id username
|
id your_user
|
||||||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
```
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
```text
|
||||||
|
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker Mods
|
## Docker Mods
|
||||||
@ -186,53 +210,101 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
|
|||||||
|
|
||||||
## Support Info
|
## Support Info
|
||||||
|
|
||||||
* Shell access whilst the container is running: `docker exec -it code-server /bin/bash`
|
* Shell access whilst the container is running:
|
||||||
* To monitor the logs of the container in realtime: `docker logs -f code-server`
|
|
||||||
* container version number
|
```bash
|
||||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server`
|
docker exec -it code-server /bin/bash
|
||||||
* image version number
|
```
|
||||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server:latest`
|
|
||||||
|
* To monitor the logs of the container in realtime:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker logs -f code-server
|
||||||
|
```
|
||||||
|
|
||||||
|
* Container version number:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server
|
||||||
|
```
|
||||||
|
|
||||||
|
* Image version number:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server:latest
|
||||||
|
```
|
||||||
|
|
||||||
## Updating Info
|
## 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:
|
Below are the instructions for updating containers:
|
||||||
|
|
||||||
### Via Docker Compose
|
### Via Docker Compose
|
||||||
|
|
||||||
* Update all images: `docker-compose pull`
|
* Update images:
|
||||||
* or update a single image: `docker-compose pull code-server`
|
* All images:
|
||||||
* Let compose update all containers as necessary: `docker-compose up -d`
|
|
||||||
* or update a single container: `docker-compose up -d code-server`
|
```bash
|
||||||
* You can also remove the old dangling images: `docker image prune`
|
docker-compose pull
|
||||||
|
```
|
||||||
|
|
||||||
|
* Single image:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose pull code-server
|
||||||
|
```
|
||||||
|
|
||||||
|
* Update containers:
|
||||||
|
* All containers:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
* Single container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d code-server
|
||||||
|
```
|
||||||
|
|
||||||
|
* You can also remove the old dangling images:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker image prune
|
||||||
|
```
|
||||||
|
|
||||||
### Via Docker Run
|
### Via Docker Run
|
||||||
|
|
||||||
* Update the image: `docker pull lscr.io/linuxserver/code-server:latest`
|
* Update the image:
|
||||||
* Stop the running container: `docker stop code-server`
|
|
||||||
* Delete the container: `docker rm code-server`
|
```bash
|
||||||
|
docker pull lscr.io/linuxserver/code-server:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
* Stop the running container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker stop code-server
|
||||||
|
```
|
||||||
|
|
||||||
|
* Delete the container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker rm code-server
|
||||||
|
```
|
||||||
|
|
||||||
* 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)
|
* 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)
|
```bash
|
||||||
|
docker image prune
|
||||||
* 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 code-server
|
|
||||||
```
|
|
||||||
|
|
||||||
* 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).
|
|
||||||
|
|
||||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
### 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
|
## Building locally
|
||||||
|
|
||||||
@ -247,16 +319,21 @@ docker build \
|
|||||||
-t lscr.io/linuxserver/code-server:latest .
|
-t lscr.io/linuxserver/code-server: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
|
```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`.
|
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **10.08.25:** - Let server listen on both ipv4 and ipv6.
|
||||||
|
* **03.06.25:** - Allow setting PWA name using env var `PWA_APPNAME`.
|
||||||
|
* **13.10.24:** - Only chown config folder when change to ownership or new install is detected.
|
||||||
|
* **09.10.24:** - Manage permissions in /config/.ssh according to file type
|
||||||
|
* **19.08.24:** - Rebase to Ubuntu Noble.
|
||||||
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
|
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
|
||||||
* **05.10.22:** - Install recommended deps to maintain parity with the older images.
|
* **05.10.22:** - Install recommended deps to maintain parity with the older images.
|
||||||
* **29.09.22:** - Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents.
|
* **29.09.22:** - Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents.
|
||||||
|
|||||||
@ -22,6 +22,6 @@ repo_vars:
|
|||||||
- CI_PORT='8443'
|
- CI_PORT='8443'
|
||||||
- CI_SSL='false'
|
- CI_SSL='false'
|
||||||
- CI_DELAY='120'
|
- CI_DELAY='120'
|
||||||
- CI_DOCKERENV='TZ=US/Pacific'
|
- CI_DOCKERENV=''
|
||||||
- CI_AUTH='user:password'
|
- CI_AUTH=''
|
||||||
- CI_WEBPATH=''
|
- CI_WEBPATH=''
|
||||||
|
|||||||
1213
package_versions.txt
1213
package_versions.txt
File diff suppressed because it is too large
Load Diff
@ -4,28 +4,29 @@
|
|||||||
project_name: code-server
|
project_name: code-server
|
||||||
project_url: "https://coder.com"
|
project_url: "https://coder.com"
|
||||||
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/code-server-banner.png"
|
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/code-server-banner.png"
|
||||||
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is VS Code running on a remote server, accessible through the browser.\n- Code on your Chromebook, tablet, and laptop with a consistent dev environment.\n- If you have a Windows or Mac workstation, more easily develop for Linux.\n- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.\n- Preserve battery life when you're on the go.\n- All intensive computation runs on your server.\n- You're no longer running excess instances of Chrome."
|
project_blurb: |
|
||||||
|
[{{ project_name|capitalize }}]({{ project_url }}) is VS Code running on a remote server, accessible through the browser.
|
||||||
|
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
|
||||||
|
- If you have a Windows or Mac workstation, more easily develop for Linux.
|
||||||
|
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
|
||||||
|
- Preserve battery life when you're on the go.
|
||||||
|
- All intensive computation runs on your server.
|
||||||
|
- You're no longer running excess instances of Chrome.
|
||||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||||
|
project_categories: "Programming"
|
||||||
# supported architectures
|
# supported architectures
|
||||||
available_architectures:
|
available_architectures:
|
||||||
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||||
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||||
# development version
|
|
||||||
development_versions: false
|
|
||||||
development_versions_items:
|
|
||||||
- {tag: "latest", desc: "Stable releases"}
|
|
||||||
# container parameters
|
# container parameters
|
||||||
common_param_env_vars_enabled: true
|
common_param_env_vars_enabled: true
|
||||||
param_container_name: "{{ project_name }}"
|
param_container_name: "{{ project_name }}"
|
||||||
param_usage_include_vols: true
|
param_usage_include_vols: true
|
||||||
param_volumes:
|
param_volumes:
|
||||||
- {vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files."}
|
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Contains all relevant configuration files."}
|
||||||
param_usage_include_ports: true
|
param_usage_include_ports: true
|
||||||
param_ports:
|
param_ports:
|
||||||
- {external_port: "8443", internal_port: "8443", port_desc: "web gui"}
|
- {external_port: "8443", internal_port: "8443", port_desc: "web gui"}
|
||||||
param_usage_include_env: true
|
|
||||||
param_env_vars:
|
|
||||||
- {env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
|
|
||||||
# optional container parameters
|
# optional container parameters
|
||||||
opt_param_usage_include_env: true
|
opt_param_usage_include_env: true
|
||||||
opt_param_env_vars:
|
opt_param_env_vars:
|
||||||
@ -33,10 +34,16 @@ opt_param_env_vars:
|
|||||||
- {env_var: "HASHED_PASSWORD", env_value: "", desc: "Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below."}
|
- {env_var: "HASHED_PASSWORD", env_value: "", desc: "Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below."}
|
||||||
- {env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the code-server terminal with the specified password."}
|
- {env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the code-server terminal with the specified password."}
|
||||||
- {env_var: "SUDO_PASSWORD_HASH", env_value: "", desc: "Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`."}
|
- {env_var: "SUDO_PASSWORD_HASH", env_value: "", desc: "Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`."}
|
||||||
- {env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains)"}
|
- {env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/coder/code-server/blob/main/docs/guide.md#using-a-subdomain)"}
|
||||||
- {env_var: "DEFAULT_WORKSPACE", env_value: "/config/workspace", desc: "If this optional variable is set, code-server will open this directory by default"}
|
- {env_var: "DEFAULT_WORKSPACE", env_value: "/config/workspace", desc: "If this optional variable is set, code-server will open this directory by default"}
|
||||||
optional_block_1: false
|
- {env_var: "PWA_APPNAME", env_value: "code-server", desc: "If this optional variable is set, the PWA app will the specified name."}
|
||||||
optional_block_1_items: ""
|
readonly_supported: true
|
||||||
|
readonly_message: |
|
||||||
|
* `/tmp` must be mounted to tmpfs
|
||||||
|
* `sudo` will not be available
|
||||||
|
nonroot_supported: true
|
||||||
|
nonroot_message: |
|
||||||
|
* `sudo` will not be available
|
||||||
# application setup block
|
# application setup block
|
||||||
app_setup_block_enabled: true
|
app_setup_block_enabled: true
|
||||||
app_setup_block: |
|
app_setup_block: |
|
||||||
@ -52,8 +59,54 @@ app_setup_block: |
|
|||||||
### Hashed code-server password
|
### Hashed code-server password
|
||||||
|
|
||||||
How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
|
How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
|
||||||
|
# init diagram
|
||||||
|
init_diagram: |
|
||||||
|
"code-server: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-config -> init-code-server
|
||||||
|
init-os-end -> init-config
|
||||||
|
init-code-server -> init-config-end
|
||||||
|
init-config -> init-config-end
|
||||||
|
init-crontab-config -> init-config-end
|
||||||
|
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-code-server
|
||||||
|
svc-code-server -> legacy-services
|
||||||
|
init-services -> svc-cron
|
||||||
|
svc-cron -> legacy-services
|
||||||
|
}
|
||||||
|
Base Images: {
|
||||||
|
"baseimage-ubuntu:noble"
|
||||||
|
}
|
||||||
|
"code-server:latest" <- Base Images
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- {date: "10.08.25:", desc: "Let server listen on both ipv4 and ipv6."}
|
||||||
|
- {date: "03.06.25:", desc: "Allow setting PWA name using env var `PWA_APPNAME`."}
|
||||||
|
- {date: "13.10.24:", desc: "Only chown config folder when change to ownership or new install is detected."}
|
||||||
|
- {date: "09.10.24:", desc: "Manage permissions in /config/.ssh according to file type"}
|
||||||
|
- {date: "19.08.24:", desc: "Rebase to Ubuntu Noble."}
|
||||||
- {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
|
- {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
|
||||||
- {date: "05.10.22:", desc: "Install recommended deps to maintain parity with the older images."}
|
- {date: "05.10.22:", desc: "Install recommended deps to maintain parity with the older images."}
|
||||||
- {date: "29.09.22:", desc: "Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents."}
|
- {date: "29.09.22:", desc: "Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents."}
|
||||||
|
|||||||
@ -1,31 +1,46 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
mkdir -p /config/{extensions,data,workspace,.ssh}
|
mkdir -p /config/{extensions,data,workspace,.ssh}
|
||||||
|
|
||||||
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
if [[ -z ${LSIO_NON_ROOT_USER} ]] && [[ -z ${LSIO_READ_ONLY_FS} ]]; then
|
||||||
echo "setting up sudo access"
|
if [[ -n "${SUDO_PASSWORD}" ]] || [[ -n "${SUDO_PASSWORD_HASH}" ]]; then
|
||||||
if ! grep -q 'abc' /etc/sudoers; then
|
echo "setting up sudo access"
|
||||||
echo "adding abc to sudoers"
|
if ! grep -q 'abc' /etc/sudoers; then
|
||||||
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
echo "adding abc to sudoers"
|
||||||
fi
|
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||||
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
fi
|
||||||
echo "setting sudo password using sudo password hash"
|
if [[ -n "${SUDO_PASSWORD_HASH}" ]]; then
|
||||||
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
|
echo "setting sudo password using sudo password hash"
|
||||||
else
|
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
|
||||||
echo "setting sudo password using SUDO_PASSWORD env var"
|
else
|
||||||
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
echo "setting sudo password using SUDO_PASSWORD env var"
|
||||||
|
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ ! -f /config/.bashrc ]] && \
|
if [[ ! -f /config/.bashrc ]]; then
|
||||||
cp /root/.bashrc /config/.bashrc
|
cp /root/.bashrc /config/.bashrc
|
||||||
[[ ! -f /config/.profile ]] && \
|
fi
|
||||||
cp /root/.profile /config/.profile
|
|
||||||
|
if [[ ! -f /config/.profile ]]; then
|
||||||
# fix permissions (ignore contents of /config/workspace)
|
cp /root/.profile /config/.profile
|
||||||
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
|
fi
|
||||||
chown abc:abc /config/workspace
|
|
||||||
chmod 700 /config/.ssh
|
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||||
if [ -n "$(ls -A /config/.ssh)" ]; then
|
# fix permissions (ignore contents of workspace)
|
||||||
chmod 600 /config/.ssh/*
|
PUID=${PUID:-911}
|
||||||
|
if [[ ! "$(stat -c %u /config/.profile)" == "${PUID}" ]]; then
|
||||||
|
echo "Change in ownership or new install detected, please be patient while we chown existing files"
|
||||||
|
echo "This could take some time"
|
||||||
|
find /config -path "/config/workspace" -prune -o -exec lsiown abc:abc {} +
|
||||||
|
lsiown abc:abc /config/workspace
|
||||||
|
fi
|
||||||
|
chmod 700 /config/.ssh
|
||||||
|
if [[ -n "$(ls -A /config/.ssh)" ]]; then
|
||||||
|
find /config/.ssh/ -type d -exec chmod 700 '{}' \;
|
||||||
|
find /config/.ssh/ -type f -exec chmod 600 '{}' \;
|
||||||
|
find /config/.ssh/ -type f -iname '*.pub' -exec chmod 644 '{}' \;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
oneshot
|
oneshot
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
/etc/s6-overlay/s6-rc.d/init-code-server/run
|
/etc/s6-overlay/s6-rc.d/init-code-server/run
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
3
|
3
|
||||||
|
|||||||
@ -1,26 +1,46 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
|
if [[ -n "${PASSWORD}" ]] || [[ -n "${HASHED_PASSWORD}" ]]; then
|
||||||
AUTH="password"
|
AUTH="password"
|
||||||
else
|
else
|
||||||
AUTH="none"
|
AUTH="none"
|
||||||
echo "starting with no password"
|
echo "starting with no password"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z ${PROXY_DOMAIN+x} ]; then
|
if [[ -z ${PROXY_DOMAIN+x} ]]; then
|
||||||
PROXY_DOMAIN_ARG=""
|
PROXY_DOMAIN_ARG=""
|
||||||
else
|
else
|
||||||
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
|
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec \
|
if [[ -z ${PWA_APPNAME} ]]; then
|
||||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
|
PWA_APPNAME="code-server"
|
||||||
s6-setuidgid abc \
|
fi
|
||||||
|
|
||||||
|
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||||
|
exec \
|
||||||
|
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
|
||||||
|
s6-setuidgid abc \
|
||||||
|
/app/code-server/bin/code-server \
|
||||||
|
--bind-addr 0.0.0.0:8443 \
|
||||||
|
--user-data-dir /config/data \
|
||||||
|
--extensions-dir /config/extensions \
|
||||||
|
--disable-telemetry \
|
||||||
|
--auth "${AUTH}" \
|
||||||
|
--app-name "${PWA_APPNAME}" \
|
||||||
|
"${PROXY_DOMAIN_ARG}" \
|
||||||
|
"${DEFAULT_WORKSPACE:-/config/workspace}"
|
||||||
|
else
|
||||||
|
exec \
|
||||||
|
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
|
||||||
/app/code-server/bin/code-server \
|
/app/code-server/bin/code-server \
|
||||||
--bind-addr 0.0.0.0:8443 \
|
--bind-addr "[::]:8443" \
|
||||||
--user-data-dir /config/data \
|
--user-data-dir /config/data \
|
||||||
--extensions-dir /config/extensions \
|
--extensions-dir /config/extensions \
|
||||||
--disable-telemetry \
|
--disable-telemetry \
|
||||||
--auth "${AUTH}" \
|
--auth "${AUTH}" \
|
||||||
|
--app-name "${PWA_APPNAME}" \
|
||||||
"${PROXY_DOMAIN_ARG}" \
|
"${PROXY_DOMAIN_ARG}" \
|
||||||
"${DEFAULT_WORKSPACE:-/config/workspace}"
|
"${DEFAULT_WORKSPACE:-/config/workspace}"
|
||||||
|
fi
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
longrun
|
longrun
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
_install=(/app/code-server/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
|
_install=(/app/code-server/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
|
||||||
|
|
||||||
if [ "$(whoami)" == "abc" ]; then
|
if [[ "$(whoami)" == "abc" ]]; then
|
||||||
"${_install[@]}" "$@"
|
"${_install[@]}" "$@"
|
||||||
else
|
else
|
||||||
s6-setuidgid abc "${_install[@]}" "$@"
|
s6-setuidgid abc "${_install[@]}" "$@"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user