mirror of
https://github.com/linuxserver/docker-code-server
synced 2025-06-26 18:27:40 +00:00
Compare commits
33 Commits
v3.7.1-ls5
...
v3.9.2-ls7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b87bd04166 | ||
|
|
8d310702da | ||
|
|
b918abc1b0 | ||
|
|
19bd4c6ae2 | ||
|
|
47bbeab80b | ||
|
|
03f4bd213b | ||
|
|
d802e75230 | ||
|
|
dddc00f810 | ||
|
|
3fe1085473 | ||
|
|
ce5a484a38 | ||
|
|
c738bbed06 | ||
|
|
8739d5dc9b | ||
|
|
9e2af03f56 | ||
|
|
37fd58ddf7 | ||
|
|
eaed61f4d2 | ||
|
|
182d211507 | ||
|
|
a3cf023555 | ||
|
|
028f9e7d26 | ||
|
|
01c5544f21 | ||
|
|
4b6d3a619a | ||
|
|
c13244ac24 | ||
|
|
da3a74c36b | ||
|
|
9e43559690 | ||
|
|
d1ece863bc | ||
|
|
ef69b7bed9 | ||
|
|
d1257a0dae | ||
|
|
cdc3aa8171 | ||
|
|
97106a204f | ||
|
|
45edbba3ca | ||
|
|
2ae2a47c39 | ||
|
|
11605d92d4 | ||
|
|
2bf7b5ad4b | ||
|
|
11e9e584d1 |
13
.github/ISSUE_TEMPLATE/config.yml
vendored
Executable file
13
.github/ISSUE_TEMPLATE/config.yml
vendored
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Discord chat support
|
||||||
|
url: https://discord.gg/YWrKVTn
|
||||||
|
about: Realtime support / chat with the community and the team.
|
||||||
|
|
||||||
|
- name: Discourse discussion forum
|
||||||
|
url: https://discourse.linuxserver.io
|
||||||
|
about: Post on our community forum.
|
||||||
|
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.linuxserver.io/images/docker-code-server
|
||||||
|
about: Documentation - information about all of our containers.
|
||||||
10
.github/ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/issue.bug.md
vendored
Normal file → Executable file
10
.github/ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/issue.bug.md
vendored
Normal file → Executable file
@@ -1,12 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
|
||||||
|
---
|
||||||
[linuxserverurl]: https://linuxserver.io
|
[linuxserverurl]: https://linuxserver.io
|
||||||
[][linuxserverurl]
|
[][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 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 --->
|
<!--- Provide a general summary of the bug in the Title above -->
|
||||||
<!--- 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 issue in the Title above -->
|
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
Executable file
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
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 -->
|
||||||
38
.github/workflows/external_trigger.yml
vendored
38
.github/workflows/external_trigger.yml
vendored
@@ -13,22 +13,24 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
||||||
echo "Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger."
|
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
||||||
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 "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
|
||||||
echo "Retrieving external version"
|
echo "**** Retrieving external version ****"
|
||||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" | jq -r '. | .tag_name')
|
EXT_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|')
|
||||||
if [ -z "${EXT_RELEASE}" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
echo "Can't retrieve external version, exiting"
|
echo "**** Can't retrieve external version, exiting ****"
|
||||||
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 }}"
|
||||||
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**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "External version: ${EXT_RELEASE}"
|
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||||
echo "Retrieving last pushed version"
|
echo "**** External version: ${EXT_RELEASE} ****"
|
||||||
|
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 \
|
||||||
@@ -51,30 +53,38 @@ 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 "**** Can't retrieve last pushed version, exiting ****"
|
||||||
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} ****"
|
||||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||||
echo "Version ${EXT_RELEASE} already pushed, exiting"
|
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||||
|
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
|
||||||
|
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build"
|
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
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 }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--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=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
buildurl="${buildurl%$'\r'}"
|
buildurl="${buildurl%$'\r'}"
|
||||||
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
"${buildurl}submitDescription" \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
--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 "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
--data-urlencode "Submit=Submit"
|
--data-urlencode "Submit=Submit"
|
||||||
echo "Notifying Discord"
|
echo "**** Notifying Discord ****"
|
||||||
TRIGGER_REASON="A version change was detected for code-server tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
TRIGGER_REASON="A version change was detected for code-server 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,
|
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"}],
|
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2.3.3
|
- uses: actions/checkout@v2.3.3
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: External Trigger Scheduler
|
- name: External Trigger Scheduler
|
||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
echo "**** Branches found: ****"
|
||||||
|
|||||||
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
@@ -8,6 +8,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-code-server/blob/master/.github/ISSUE_TEMPLATE.md)!'
|
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-code-server/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-code-server/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-code-server/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-code-server/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
13
.github/workflows/package_trigger.yml
vendored
13
.github/workflows/package_trigger.yml
vendored
@@ -13,15 +13,24 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
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. ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\"."
|
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 ****"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\". ****"
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
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|")
|
--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=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
buildurl="${buildurl%$'\r'}"
|
buildurl="${buildurl%$'\r'}"
|
||||||
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
"${buildurl}submitDescription" \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||||
|
|||||||
10
.github/workflows/package_trigger_scheduler.yml
vendored
10
.github/workflows/package_trigger_scheduler.yml
vendored
@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '04 6 * * 6'
|
- cron: '00 12 * * 0'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2.3.3
|
- uses: actions/checkout@v2.3.3
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Package Trigger Scheduler
|
- name: Package Trigger Scheduler
|
||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
echo "**** Branches found: ****"
|
||||||
@@ -29,6 +29,7 @@ jobs:
|
|||||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||||
|
triggered_branches="${triggered_branches}${br} "
|
||||||
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" \
|
||||||
@@ -42,3 +43,8 @@ jobs:
|
|||||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||||
fi
|
fi
|
||||||
done
|
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 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"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -41,3 +41,4 @@ $RECYCLE.BIN/
|
|||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
.jenkins-external
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ RUN \
|
|||||||
yarn && \
|
yarn && \
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
yarn --production --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
apt-get purge --auto-remove -y \
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ RUN \
|
|||||||
yarn && \
|
yarn && \
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
yarn --production --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
apt-get purge --auto-remove -y \
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ RUN \
|
|||||||
yarn && \
|
yarn && \
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
yarn --production --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
apt-get purge --auto-remove -y \
|
||||||
|
|||||||
162
Jenkinsfile
vendored
162
Jenkinsfile
vendored
@@ -16,9 +16,6 @@ pipeline {
|
|||||||
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||||
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||||
EXT_GIT_BRANCH = 'master'
|
|
||||||
EXT_USER = 'cdr'
|
|
||||||
EXT_REPO = 'code-server'
|
|
||||||
CONTAINER_NAME = 'code-server'
|
CONTAINER_NAME = 'code-server'
|
||||||
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
@@ -58,7 +55,7 @@ pipeline {
|
|||||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||||
env.PULL_REQUEST = env.CHANGE_ID
|
env.PULL_REQUEST = env.CHANGE_ID
|
||||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml'
|
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml ./.github/workflows/package_trigger.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/external_trigger.yml ./.github/workflows/external_trigger_scheduler.yml'
|
||||||
}
|
}
|
||||||
script{
|
script{
|
||||||
env.LS_RELEASE_NUMBER = sh(
|
env.LS_RELEASE_NUMBER = sh(
|
||||||
@@ -101,23 +98,16 @@ pipeline {
|
|||||||
/* ########################
|
/* ########################
|
||||||
External Release Tagging
|
External Release Tagging
|
||||||
######################## */
|
######################## */
|
||||||
// If this is a stable github release use the latest endpoint from github to determine the ext tag
|
// If this is a custom command to determine version use that command
|
||||||
stage("Set ENV github_stable"){
|
stage("Set tag custom bash"){
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = sh(
|
||||||
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
|
script: ''' curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|' ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
}
|
env.RELEASE_LINK = 'custom_command'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a stable or devel github release generate the link for the build message
|
|
||||||
stage("Set ENV github_link"){
|
|
||||||
steps{
|
|
||||||
script{
|
|
||||||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Sanitize the release tag and strip illegal docker or github characters
|
// Sanitize the release tag and strip illegal docker or github characters
|
||||||
stage("Sanitize tag"){
|
stage("Sanitize tag"){
|
||||||
@@ -145,6 +135,7 @@ pipeline {
|
|||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
}
|
}
|
||||||
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||||
}
|
}
|
||||||
@@ -166,6 +157,7 @@ pipeline {
|
|||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
}
|
}
|
||||||
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||||
@@ -187,6 +179,7 @@ pipeline {
|
|||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||||
}
|
}
|
||||||
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||||
@@ -238,18 +231,66 @@ pipeline {
|
|||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
|
# Stage 1 - Jenkinsfile update
|
||||||
|
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||||
|
mkdir -p ${TEMPDIR}/repo
|
||||||
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
|
git checkout -f master
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
|
git add Jenkinsfile
|
||||||
|
git commit -m 'Bot Updating Templated Files'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Updating Jenkinsfile"
|
||||||
|
rm -Rf ${TEMPDIR}
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Jenkinsfile is up to date."
|
||||||
|
fi
|
||||||
|
# Stage 2 - Delete old templates
|
||||||
|
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md"
|
||||||
|
for i in ${OLD_TEMPLATES}; do
|
||||||
|
if [[ -f "${i}" ]]; then
|
||||||
|
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
|
||||||
|
mkdir -p ${TEMPDIR}/repo
|
||||||
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
|
git checkout -f master
|
||||||
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
|
for i in ${TEMPLATES_TO_DELETE}; do
|
||||||
|
git rm "${i}"
|
||||||
|
done
|
||||||
|
git commit -m 'Bot Updating Templated Files'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Deleting old templates"
|
||||||
|
rm -Rf ${TEMPDIR}
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "No templates to delete"
|
||||||
|
fi
|
||||||
|
# Stage 3 - Update templates
|
||||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]]; then
|
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
|
||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f master
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||||
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||||
|
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}/
|
cd ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
|
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
|
||||||
|
echo ".jenkins-external" >> .gitignore
|
||||||
|
git add .gitignore
|
||||||
|
fi
|
||||||
git add ${TEMPLATED_FILES}
|
git add ${TEMPLATED_FILES}
|
||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
@@ -259,13 +300,30 @@ pipeline {
|
|||||||
fi
|
fi
|
||||||
mkdir -p ${TEMPDIR}/gitbook
|
mkdir -p ${TEMPDIR}/gitbook
|
||||||
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
|
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
|
||||||
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
||||||
cd ${TEMPDIR}/gitbook/docker-documentation/
|
cd ${TEMPDIR}/gitbook/docker-documentation/
|
||||||
git add images/docker-${CONTAINER_NAME}.md
|
git add images/docker-${CONTAINER_NAME}.md
|
||||||
git commit -m 'Bot Updating Documentation'
|
git commit -m 'Bot Updating Documentation'
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
|
||||||
fi
|
fi
|
||||||
|
mkdir -p ${TEMPDIR}/unraid
|
||||||
|
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
|
||||||
|
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||||
|
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
|
||||||
|
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
|
||||||
|
fi
|
||||||
|
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
||||||
|
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||||
|
echo "Image is on the ignore list, skipping Unraid template upload"
|
||||||
|
else
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||||
|
cd ${TEMPDIR}/unraid/templates/
|
||||||
|
git add unraid/${CONTAINER_NAME}.xml
|
||||||
|
git commit -m 'Bot Updating Unraid Template'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -Rf ${TEMPDIR}'''
|
rm -Rf ${TEMPDIR}'''
|
||||||
script{
|
script{
|
||||||
env.FILES_UPDATED = sh(
|
env.FILES_UPDATED = sh(
|
||||||
@@ -320,8 +378,9 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
|
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Build MultiArch Docker containers for push to LS Repo
|
// Build MultiArch Docker containers for push to LS Repo
|
||||||
@@ -333,8 +392,9 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('Build X86') {
|
stage('Build X86') {
|
||||||
steps {
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARMHF') {
|
stage('Build ARMHF') {
|
||||||
@@ -342,12 +402,13 @@ pipeline {
|
|||||||
label 'ARMHF'
|
label 'ARMHF'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
echo 'Logging into Github'
|
echo 'Logging into Github'
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
'''
|
'''
|
||||||
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
retry(5) {
|
retry(5) {
|
||||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
@@ -362,12 +423,13 @@ pipeline {
|
|||||||
label 'ARM64'
|
label 'ARM64'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
echo 'Logging into Github'
|
echo 'Logging into Github'
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
'''
|
'''
|
||||||
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
retry(5) {
|
retry(5) {
|
||||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
@@ -440,6 +502,13 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "Packages were updated. Cleaning up the image and exiting."
|
||||||
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
|
fi'''
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = 'ABORTED'
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
}
|
}
|
||||||
@@ -457,6 +526,13 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "There are no package updates. Cleaning up the image and exiting."
|
||||||
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
|
fi'''
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = 'ABORTED'
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
}
|
}
|
||||||
@@ -481,7 +557,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-ci:latest
|
docker pull ghcr.io/linuxserver/ci:latest
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
@@ -506,7 +582,7 @@ pipeline {
|
|||||||
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||||
-e DO_REGION="ams3" \
|
-e DO_REGION="ams3" \
|
||||||
-e DO_BUCKET="lsio-ci" \
|
-e DO_BUCKET="lsio-ci" \
|
||||||
-t ghcr.io/linuxserver/lsiodev-ci:latest \
|
-t ghcr.io/linuxserver/ci:latest \
|
||||||
python /ci/ci.py'''
|
python /ci/ci.py'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -546,7 +622,7 @@ pipeline {
|
|||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
|
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:${META_TAG} \
|
${DELETEIMAGE}:${META_TAG} \
|
||||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||||
@@ -610,6 +686,7 @@ pipeline {
|
|||||||
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
|
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
|
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
|
||||||
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
|
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
||||||
@@ -624,10 +701,13 @@ pipeline {
|
|||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||||
${DELETEIMAGE}:amd64-latest \
|
${DELETEIMAGE}:amd64-latest \
|
||||||
|
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-latest \
|
${DELETEIMAGE}:arm32v7-latest \
|
||||||
|
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-latest || :
|
${DELETEIMAGE}:arm64v8-latest \
|
||||||
|
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
||||||
done
|
done
|
||||||
docker rmi \
|
docker rmi \
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||||
@@ -647,20 +727,20 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
|
echo "Pushing New tag for current commit ${META_TAG}"
|
||||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
-d '{"tag":"'${META_TAG}'",\
|
||||||
"object": "'${COMMIT_SHA}'",\
|
"object": "'${COMMIT_SHA}'",\
|
||||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||||
"type": "commit",\
|
"type": "commit",\
|
||||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
echo "Pushing New release for Tag"
|
echo "Pushing New release for Tag"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
echo '{"tag_name":"'${META_TAG}'",\
|
||||||
"target_commitish": "master",\
|
"target_commitish": "master",\
|
||||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
"name": "'${META_TAG}'",\
|
||||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
|
||||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||||
@@ -686,7 +766,7 @@ pipeline {
|
|||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-readme-sync
|
docker pull ghcr.io/linuxserver/readme-sync
|
||||||
docker run --rm=true \
|
docker run --rm=true \
|
||||||
-e DOCKERHUB_USERNAME=$DOCKERUSER \
|
-e DOCKERHUB_USERNAME=$DOCKERUSER \
|
||||||
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
|
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
|
||||||
@@ -694,7 +774,7 @@ pipeline {
|
|||||||
-e DOCKER_REPOSITORY=${IMAGE} \
|
-e DOCKER_REPOSITORY=${IMAGE} \
|
||||||
-e GIT_BRANCH=master \
|
-e GIT_BRANCH=master \
|
||||||
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
|
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
|
||||||
ghcr.io/linuxserver/lsiodev-readme-sync bash -c 'node sync'
|
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
|
||||||
rm -Rf ${TEMPDIR} '''
|
rm -Rf ${TEMPDIR} '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
README.md
25
README.md
@@ -31,7 +31,7 @@ Find us at:
|
|||||||
[](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)
|
||||||
[](https://gitlab.com/Linuxserver.io/docker-code-server/container_registry)
|
[](https://gitlab.com/linuxserver.io/docker-code-server/container_registry)
|
||||||
[](https://microbadger.com/images/linuxserver/code-server "Get your own version badge on microbadger.com")
|
[](https://microbadger.com/images/linuxserver/code-server "Get your own version badge on microbadger.com")
|
||||||
[](https://hub.docker.com/r/linuxserver/code-server)
|
[](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
[](https://hub.docker.com/r/linuxserver/code-server)
|
[](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
@@ -91,7 +91,9 @@ services:
|
|||||||
- PGID=1000
|
- PGID=1000
|
||||||
- TZ=Europe/London
|
- TZ=Europe/London
|
||||||
- PASSWORD=password #optional
|
- PASSWORD=password #optional
|
||||||
|
- HASHED_PASSWORD= #optional
|
||||||
- SUDO_PASSWORD=password #optional
|
- SUDO_PASSWORD=password #optional
|
||||||
|
- SUDO_PASSWORD_HASH= #optional
|
||||||
- PROXY_DOMAIN=code-server.my.domain #optional
|
- PROXY_DOMAIN=code-server.my.domain #optional
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/appdata/config:/config
|
- /path/to/appdata/config:/config
|
||||||
@@ -109,7 +111,9 @@ docker run -d \
|
|||||||
-e PGID=1000 \
|
-e PGID=1000 \
|
||||||
-e TZ=Europe/London \
|
-e TZ=Europe/London \
|
||||||
-e PASSWORD=password `#optional` \
|
-e PASSWORD=password `#optional` \
|
||||||
|
-e HASHED_PASSWORD= `#optional` \
|
||||||
-e SUDO_PASSWORD=password `#optional` \
|
-e SUDO_PASSWORD=password `#optional` \
|
||||||
|
-e SUDO_PASSWORD_HASH= `#optional` \
|
||||||
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
|
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
|
||||||
-p 8443:8443 \
|
-p 8443:8443 \
|
||||||
-v /path/to/appdata/config:/config \
|
-v /path/to/appdata/config:/config \
|
||||||
@@ -128,8 +132,10 @@ Container images are configured using parameters passed at runtime (such as thos
|
|||||||
| `-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=Europe/London` | Specify a timezone to use EG Europe/London |
|
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
|
||||||
| `-e PASSWORD=password` | Optional web gui password, if not provided, there will be no auth. |
|
| `-e PASSWORD=password` | Optional web gui password, if `PASSWORD` or `HASHED_PASSWORD` is not provided, there will be no auth. |
|
||||||
|
| `-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 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/doc/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/cdr/code-server/blob/master/doc/FAQ.md#sub-domains) |
|
||||||
| `-v /config` | Contains all relevant configuration files. |
|
| `-v /config` | Contains all relevant configuration files. |
|
||||||
|
|
||||||
@@ -167,14 +173,19 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
|
|||||||
|
|
||||||
## Application Setup
|
## Application Setup
|
||||||
|
|
||||||
Access the webui at `http://<your-ip>:8443`.
|
Access the webui at `http://<your-ip>:8443`.
|
||||||
For github integration, drop your ssh key in to `/config/.ssh`.
|
For github integration, drop your ssh key in to `/config/.ssh`.
|
||||||
Then open a terminal from the top menu and set your github username and email via the following commands
|
Then open a terminal from the top menu and set your github username and email via the following commands
|
||||||
```
|
|
||||||
|
```bash
|
||||||
git config --global user.name "username"
|
git config --global user.name "username"
|
||||||
git config --global user.email "email address"
|
git config --global user.email "email address"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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).
|
||||||
|
|
||||||
|
|
||||||
## Docker Mods
|
## Docker Mods
|
||||||
[](https://mods.linuxserver.io/?mod=code-server "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
|
[](https://mods.linuxserver.io/?mod=code-server "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
|
||||||
@@ -247,6 +258,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **04.02.20:** - Allow setting gui password via hash using env var `HASHED_PASSWORD`.
|
||||||
|
* **23.12.20:** - Allow setting sudo password via hash using env var `SUDO_PASSWORD_HASH`.
|
||||||
* **29.05.20:** - Add --domain-proxy support.
|
* **29.05.20:** - Add --domain-proxy support.
|
||||||
* **21.05.20:** - Shrink images, install via yarn, fix arm32v7 build.
|
* **21.05.20:** - Shrink images, install via yarn, fix arm32v7 build.
|
||||||
* **18.05.20:** - Switch to multi-arch images, install via npm.
|
* **18.05.20:** - Switch to multi-arch images, install via npm.
|
||||||
|
|||||||
@@ -2,14 +2,12 @@
|
|||||||
|
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-code-server
|
project_name: docker-code-server
|
||||||
external_type: github_stable
|
external_type: na
|
||||||
|
custom_version_command: "curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '.\"dist-tags\".latest' | sed 's|^|v|'"
|
||||||
release_type: stable
|
release_type: stable
|
||||||
release_tag: latest
|
release_tag: latest
|
||||||
ls_branch: master
|
ls_branch: master
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- EXT_GIT_BRANCH = 'master'
|
|
||||||
- EXT_USER = 'cdr'
|
|
||||||
- EXT_REPO = 'code-server'
|
|
||||||
- CONTAINER_NAME = 'code-server'
|
- CONTAINER_NAME = 'code-server'
|
||||||
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
- LS_USER = 'linuxserver'
|
- LS_USER = 'linuxserver'
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
adduser3.116ubuntu1
|
adduser3.116ubuntu1
|
||||||
apt1.6.12ubuntu0.1
|
apt1.6.12ubuntu0.2
|
||||||
apt-utils1.6.12ubuntu0.1
|
apt-utils1.6.12ubuntu0.2
|
||||||
base-files10.1ubuntu2.10
|
base-files10.1ubuntu2.10
|
||||||
base-passwd3.5.44
|
base-passwd3.5.44
|
||||||
bash4.4.18-2ubuntu1.2
|
bash4.4.18-2ubuntu1.2
|
||||||
bsdutils1:2.31.1-0.4ubuntu3.7
|
bsdutils1:2.31.1-0.4ubuntu3.7
|
||||||
bzip21.0.6-8.1ubuntu0.2
|
bzip21.0.6-8.1ubuntu0.2
|
||||||
ca-certificates20201027ubuntu0.18.04.1
|
ca-certificates20210119~18.04.1
|
||||||
coreutils8.28-1ubuntu1
|
coreutils8.28-1ubuntu1
|
||||||
curl7.58.0-2ubuntu3.10
|
curl7.58.0-2ubuntu3.12
|
||||||
dash0.5.8-2.10
|
dash0.5.8-2.10
|
||||||
debconf1.5.66ubuntu1
|
debconf1.5.66ubuntu1
|
||||||
debianutils4.8.4
|
debianutils4.8.4
|
||||||
diffutils1:3.6-1
|
diffutils1:3.6-1
|
||||||
dirmngr2.2.4-1ubuntu1.3
|
dirmngr2.2.4-1ubuntu1.4
|
||||||
dpkg1.19.0.5ubuntu2.3
|
dpkg1.19.0.5ubuntu2.3
|
||||||
e2fsprogs1.44.1-1ubuntu1.3
|
e2fsprogs1.44.1-1ubuntu1.3
|
||||||
fdisk2.31.1-0.4ubuntu3.7
|
fdisk2.31.1-0.4ubuntu3.7
|
||||||
file1:5.32-2ubuntu0.4
|
file1:5.32-2ubuntu0.4
|
||||||
findutils4.6.0+git+20170828-2
|
findutils4.6.0+git+20170828-2
|
||||||
gcc-8-base8.4.0-1ubuntu1~18.04
|
gcc-8-base8.4.0-1ubuntu1~18.04
|
||||||
git1:2.17.1-1ubuntu0.7
|
git1:2.17.1-1ubuntu0.8
|
||||||
git-man1:2.17.1-1ubuntu0.7
|
git-man1:2.17.1-1ubuntu0.8
|
||||||
gnupg2.2.4-1ubuntu1.3
|
gnupg2.2.4-1ubuntu1.4
|
||||||
gnupg-l10n2.2.4-1ubuntu1.3
|
gnupg-l10n2.2.4-1ubuntu1.4
|
||||||
gnupg-utils2.2.4-1ubuntu1.3
|
gnupg-utils2.2.4-1ubuntu1.4
|
||||||
gpg2.2.4-1ubuntu1.3
|
gpg2.2.4-1ubuntu1.4
|
||||||
gpg-agent2.2.4-1ubuntu1.3
|
gpg-agent2.2.4-1ubuntu1.4
|
||||||
gpgconf2.2.4-1ubuntu1.3
|
gpgconf2.2.4-1ubuntu1.4
|
||||||
gpgsm2.2.4-1ubuntu1.3
|
gpgsm2.2.4-1ubuntu1.4
|
||||||
gpgv2.2.4-1ubuntu1.3
|
gpgv2.2.4-1ubuntu1.4
|
||||||
gpg-wks-client2.2.4-1ubuntu1.3
|
gpg-wks-client2.2.4-1ubuntu1.4
|
||||||
gpg-wks-server2.2.4-1ubuntu1.3
|
gpg-wks-server2.2.4-1ubuntu1.4
|
||||||
grep3.1-2build1
|
grep3.1-2build1
|
||||||
gzip1.6-5ubuntu1
|
gzip1.6-5ubuntu1
|
||||||
hostname3.20
|
hostname3.20
|
||||||
@@ -40,22 +40,22 @@ jq1.5+dfsg-2
|
|||||||
krb5-locales1.16-2ubuntu0.2
|
krb5-locales1.16-2ubuntu0.2
|
||||||
less487-0.1
|
less487-0.1
|
||||||
libacl12.2.52-3build1
|
libacl12.2.52-3build1
|
||||||
libapt-inst2.01.6.12ubuntu0.1
|
libapt-inst2.01.6.12ubuntu0.2
|
||||||
libapt-pkg5.01.6.12ubuntu0.1
|
libapt-pkg5.01.6.12ubuntu0.2
|
||||||
libasn1-8-heimdal7.5.0+dfsg-1
|
libasn1-8-heimdal7.5.0+dfsg-1
|
||||||
libassuan02.5.1-2
|
libassuan02.5.1-2
|
||||||
libattr11:2.4.47-2build1
|
libattr11:2.4.47-2build1
|
||||||
libaudit11:2.8.2-1ubuntu1
|
libaudit11:2.8.2-1ubuntu1.1
|
||||||
libaudit-common1:2.8.2-1ubuntu1
|
libaudit-common1:2.8.2-1ubuntu1.1
|
||||||
libblkid12.31.1-0.4ubuntu3.7
|
libblkid12.31.1-0.4ubuntu3.7
|
||||||
libbsd00.8.7-1ubuntu0.1
|
libbsd00.8.7-1ubuntu0.1
|
||||||
libbz2-1.01.0.6-8.1ubuntu0.2
|
libbz2-1.01.0.6-8.1ubuntu0.2
|
||||||
libc62.27-3ubuntu1.3
|
libc62.27-3ubuntu1.4
|
||||||
libcap-ng00.7.7-3.1
|
libcap-ng00.7.7-3.1
|
||||||
libc-bin2.27-3ubuntu1.2
|
libc-bin2.27-3ubuntu1.4
|
||||||
libcom-err21.44.1-1ubuntu1.3
|
libcom-err21.44.1-1ubuntu1.3
|
||||||
libcurl3-gnutls7.58.0-2ubuntu3.10
|
libcurl3-gnutls7.58.0-2ubuntu3.12
|
||||||
libcurl47.58.0-2ubuntu3.10
|
libcurl47.58.0-2ubuntu3.12
|
||||||
libdb5.35.3.28-13.1ubuntu1.1
|
libdb5.35.3.28-13.1ubuntu1.1
|
||||||
libdebconfclient00.213ubuntu1
|
libdebconfclient00.213ubuntu1
|
||||||
libedit23.1-20170329-1
|
libedit23.1-20170329-1
|
||||||
@@ -86,8 +86,8 @@ libkrb5-26-heimdal7.5.0+dfsg-1
|
|||||||
libkrb5-31.16-2ubuntu0.2
|
libkrb5-31.16-2ubuntu0.2
|
||||||
libkrb5support01.16-2ubuntu0.2
|
libkrb5support01.16-2ubuntu0.2
|
||||||
libksba81.3.5-2
|
libksba81.3.5-2
|
||||||
libldap-2.4-22.4.45+dfsg-1ubuntu1.8
|
libldap-2.4-22.4.45+dfsg-1ubuntu1.10
|
||||||
libldap-common2.4.45+dfsg-1ubuntu1.8
|
libldap-common2.4.45+dfsg-1ubuntu1.10
|
||||||
liblz4-10.0~r131-2ubuntu3
|
liblz4-10.0~r131-2ubuntu3
|
||||||
liblzma55.2.2-1.3
|
liblzma55.2.2-1.3
|
||||||
libmagic11:5.32-2ubuntu0.4
|
libmagic11:5.32-2ubuntu0.4
|
||||||
@@ -99,7 +99,7 @@ libnettle63.4-1
|
|||||||
libnghttp2-141.30.0-1ubuntu1
|
libnghttp2-141.30.0-1ubuntu1
|
||||||
libnpth01.5-3
|
libnpth01.5-3
|
||||||
libonig46.7.0-1
|
libonig46.7.0-1
|
||||||
libp11-kit00.23.9-2
|
libp11-kit00.23.9-2ubuntu0.1
|
||||||
libpam0g1.1.8-3.6ubuntu2.18.04.2
|
libpam0g1.1.8-3.6ubuntu2.18.04.2
|
||||||
libpam-modules1.1.8-3.6ubuntu2.18.04.2
|
libpam-modules1.1.8-3.6ubuntu2.18.04.2
|
||||||
libpam-modules-bin1.1.8-3.6ubuntu2.18.04.2
|
libpam-modules-bin1.1.8-3.6ubuntu2.18.04.2
|
||||||
@@ -108,15 +108,15 @@ libpcre32:8.39-9
|
|||||||
libperl5.265.26.1-6ubuntu0.5
|
libperl5.265.26.1-6ubuntu0.5
|
||||||
libprocps62:3.3.12-3ubuntu1.2
|
libprocps62:3.3.12-3ubuntu1.2
|
||||||
libpsl50.19.1-5build1
|
libpsl50.19.1-5build1
|
||||||
libpython2.7-minimal2.7.17-1~18.04ubuntu1.2
|
libpython2.7-minimal2.7.17-1~18.04ubuntu1.6
|
||||||
libpython2.7-stdlib2.7.17-1~18.04ubuntu1.2
|
libpython2.7-stdlib2.7.17-1~18.04ubuntu1.6
|
||||||
libpython-stdlib2.7.15~rc1-1
|
libpython-stdlib2.7.15~rc1-1
|
||||||
libreadline77.0-3
|
libreadline77.0-3
|
||||||
libroken18-heimdal7.5.0+dfsg-1
|
libroken18-heimdal7.5.0+dfsg-1
|
||||||
librtmp12.4+20151223.gitfa8646d.1-1
|
librtmp12.4+20151223.gitfa8646d.1-1
|
||||||
libsasl2-22.1.27~101-g0780600+dfsg-3ubuntu2.1
|
libsasl2-22.1.27~101-g0780600+dfsg-3ubuntu2.3
|
||||||
libsasl2-modules2.1.27~101-g0780600+dfsg-3ubuntu2.1
|
libsasl2-modules2.1.27~101-g0780600+dfsg-3ubuntu2.3
|
||||||
libsasl2-modules-db2.1.27~101-g0780600+dfsg-3ubuntu2.1
|
libsasl2-modules-db2.1.27~101-g0780600+dfsg-3ubuntu2.3
|
||||||
libseccomp22.4.3-1ubuntu3.18.04.3
|
libseccomp22.4.3-1ubuntu3.18.04.3
|
||||||
libselinux12.7-2build2
|
libselinux12.7-2build2
|
||||||
libsemanage12.7-2build2
|
libsemanage12.7-2build2
|
||||||
@@ -125,13 +125,13 @@ libsepol12.7-1
|
|||||||
libsmartcols12.31.1-0.4ubuntu3.7
|
libsmartcols12.31.1-0.4ubuntu3.7
|
||||||
libsqlite3-03.22.0-1ubuntu0.4
|
libsqlite3-03.22.0-1ubuntu0.4
|
||||||
libss21.44.1-1ubuntu1.3
|
libss21.44.1-1ubuntu1.3
|
||||||
libssl1.0.01.0.2n-1ubuntu5.4
|
libssl1.0.01.0.2n-1ubuntu5.6
|
||||||
libssl1.11.1.1-1ubuntu2.1~18.04.6
|
libssl1.11.1.1-1ubuntu2.1~18.04.8
|
||||||
libstdc++68.4.0-1ubuntu1~18.04
|
libstdc++68.4.0-1ubuntu1~18.04
|
||||||
libsystemd0237-3ubuntu10.42
|
libsystemd0237-3ubuntu10.45
|
||||||
libtasn1-64.13-2
|
libtasn1-64.13-2
|
||||||
libtinfo56.1-1ubuntu1.18.04
|
libtinfo56.1-1ubuntu1.18.04
|
||||||
libudev1237-3ubuntu10.42
|
libudev1237-3ubuntu10.45
|
||||||
libunistring20.9.9-0ubuntu2
|
libunistring20.9.9-0ubuntu2
|
||||||
libuuid12.31.1-0.4ubuntu3.7
|
libuuid12.31.1-0.4ubuntu3.7
|
||||||
libwind0-heimdal7.5.0+dfsg-1
|
libwind0-heimdal7.5.0+dfsg-1
|
||||||
@@ -142,22 +142,22 @@ libxcb11.13-2~ubuntu18.04
|
|||||||
libxdmcp61:1.1.2-3
|
libxdmcp61:1.1.2-3
|
||||||
libxext62:1.3.3-1
|
libxext62:1.3.3-1
|
||||||
libxmuu12:1.1.2-2
|
libxmuu12:1.1.2-2
|
||||||
libzstd11.3.3+dfsg-2ubuntu1.1
|
libzstd11.3.3+dfsg-2ubuntu1.2
|
||||||
locales2.27-3ubuntu1.3
|
locales2.27-3ubuntu1.4
|
||||||
login1:4.5-1ubuntu2
|
login1:4.5-1ubuntu2
|
||||||
lsb-base9.20170808ubuntu1
|
lsb-base9.20170808ubuntu1
|
||||||
mawk1.3.3-17ubuntu3
|
mawk1.3.3-17ubuntu3
|
||||||
mime-support3.60ubuntu1
|
mime-support3.60ubuntu1
|
||||||
mount2.31.1-0.4ubuntu3.7
|
mount2.31.1-0.4ubuntu3.7
|
||||||
multiarch-support2.27-3ubuntu1.3
|
multiarch-support2.27-3ubuntu1.4
|
||||||
nano2.9.3-2
|
nano2.9.3-2
|
||||||
ncurses-base6.1-1ubuntu1.18.04
|
ncurses-base6.1-1ubuntu1.18.04
|
||||||
ncurses-bin6.1-1ubuntu1.18.04
|
ncurses-bin6.1-1ubuntu1.18.04
|
||||||
netbase5.4
|
netbase5.4
|
||||||
net-tools1.60+git20161116.90da8a0-1ubuntu1
|
net-tools1.60+git20161116.90da8a0-1ubuntu1
|
||||||
nodejs12.19.1-1nodesource1
|
nodejs12.21.0-1nodesource1
|
||||||
openssh-client1:7.6p1-4ubuntu0.3
|
openssh-client1:7.6p1-4ubuntu0.3
|
||||||
openssl1.1.1-1ubuntu2.1~18.04.6
|
openssl1.1.1-1ubuntu2.1~18.04.8
|
||||||
passwd1:4.5-1ubuntu2
|
passwd1:4.5-1ubuntu2
|
||||||
patch2.7.6-2ubuntu1.1
|
patch2.7.6-2ubuntu1.1
|
||||||
perl5.26.1-6ubuntu0.5
|
perl5.26.1-6ubuntu0.5
|
||||||
@@ -167,16 +167,16 @@ pinentry-curses1.1.0-1
|
|||||||
procps2:3.3.12-3ubuntu1.2
|
procps2:3.3.12-3ubuntu1.2
|
||||||
publicsuffix20180223.1310-1
|
publicsuffix20180223.1310-1
|
||||||
python2.7.15~rc1-1
|
python2.7.15~rc1-1
|
||||||
python2.72.7.17-1~18.04ubuntu1.2
|
python2.72.7.17-1~18.04ubuntu1.6
|
||||||
python2.7-minimal2.7.17-1~18.04ubuntu1.2
|
python2.7-minimal2.7.17-1~18.04ubuntu1.6
|
||||||
python-minimal2.7.15~rc1-1
|
python-minimal2.7.15~rc1-1
|
||||||
readline-common7.0-3
|
readline-common7.0-3
|
||||||
sed4.4-2
|
sed4.4-2
|
||||||
sensible-utils0.0.12
|
sensible-utils0.0.12
|
||||||
sudo1.8.21p2-3ubuntu1.3
|
sudo1.8.21p2-3ubuntu1.4
|
||||||
sysvinit-utils2.88dsf-59.10ubuntu1
|
sysvinit-utils2.88dsf-59.10ubuntu1
|
||||||
tar1.29b-2ubuntu0.1
|
tar1.29b-2ubuntu0.2
|
||||||
tzdata2020d-0ubuntu0.18.04
|
tzdata2021a-0ubuntu0.18.04
|
||||||
ubuntu-keyring2018.09.18.1~18.04.0
|
ubuntu-keyring2018.09.18.1~18.04.0
|
||||||
util-linux2.31.1-0.4ubuntu3.7
|
util-linux2.31.1-0.4ubuntu3.7
|
||||||
xauth1:1.0.10-1
|
xauth1:1.0.10-1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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.
|
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.
|
- 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.
|
- If you have a Windows or Mac workstation, more easily develop for Linux.
|
||||||
@@ -42,13 +42,15 @@ 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_usage_include_env: true
|
||||||
param_env_vars:
|
param_env_vars:
|
||||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
|
- { 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:
|
||||||
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if not provided, there will be no auth."}
|
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if `PASSWORD` or `HASHED_PASSWORD` is not provided, there will be no auth." }
|
||||||
- { 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: "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_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/doc/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/cdr/code-server/blob/master/doc/FAQ.md#sub-domains)" }
|
||||||
|
|
||||||
optional_block_1: false
|
optional_block_1: false
|
||||||
@@ -57,18 +59,25 @@ optional_block_1_items: ""
|
|||||||
# application setup block
|
# application setup block
|
||||||
app_setup_block_enabled: true
|
app_setup_block_enabled: true
|
||||||
app_setup_block: |
|
app_setup_block: |
|
||||||
Access the webui at `http://<your-ip>:8443`.
|
Access the webui at `http://<your-ip>:8443`.
|
||||||
For github integration, drop your ssh key in to `/config/.ssh`.
|
For github integration, drop your ssh key in to `/config/.ssh`.
|
||||||
Then open a terminal from the top menu and set your github username and email via the following commands
|
Then open a terminal from the top menu and set your github username and email via the following commands
|
||||||
```
|
|
||||||
|
```bash
|
||||||
git config --global user.name "username"
|
git config --global user.name "username"
|
||||||
git config --global user.email "email address"
|
git config --global user.email "email address"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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).
|
||||||
|
|
||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
- { date: "29.05.20:", desc: "Add --domain-proxy support."}
|
- { date: "04.02.20:", desc: "Allow setting gui password via hash using env var `HASHED_PASSWORD`." }
|
||||||
|
- { date: "23.12.20:", desc: "Allow setting sudo password via hash using env var `SUDO_PASSWORD_HASH`." }
|
||||||
|
- { date: "29.05.20:", desc: "Add --domain-proxy support." }
|
||||||
- { date: "21.05.20:", desc: "Shrink images, install via yarn, fix arm32v7 build." }
|
- { date: "21.05.20:", desc: "Shrink images, install via yarn, fix arm32v7 build." }
|
||||||
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
|
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
|
||||||
- { date: "29.04.20:", desc: "Update start arguments." }
|
- { date: "29.04.20:", desc: "Update start arguments." }
|
||||||
|
|||||||
@@ -2,14 +2,19 @@
|
|||||||
|
|
||||||
mkdir -p /config/{extensions,data,workspace,.ssh}
|
mkdir -p /config/{extensions,data,workspace,.ssh}
|
||||||
|
|
||||||
if [ -n "${SUDO_PASSWORD}" ]; then
|
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||||
echo "setting up sudo access"
|
echo "setting up sudo access"
|
||||||
if ! grep -q 'abc' /etc/sudoers; then
|
if ! grep -q 'abc' /etc/sudoers; then
|
||||||
echo "adding abc to sudoers"
|
echo "adding abc to sudoers"
|
||||||
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||||
fi
|
fi
|
||||||
echo "setting sudo password"
|
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||||
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
echo "setting sudo password using sudo password hash"
|
||||||
|
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
|
||||||
|
else
|
||||||
|
echo "setting sudo password using SUDO_PASSWORD env var"
|
||||||
|
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# permissions
|
# permissions
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
if [ -n "${PASSWORD}" ]; then
|
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
|
||||||
AUTH="password"
|
AUTH="password"
|
||||||
else
|
else
|
||||||
AUTH="none"
|
AUTH="none"
|
||||||
@@ -9,7 +9,7 @@ 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user