Compare commits
183 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c55fc69b87 | ||
|
60465428f3 | ||
|
5851388cf4 | ||
|
0f0354ded4 | ||
|
d41e959c3f | ||
|
393806fd5e | ||
|
a87b1ef82d | ||
|
fd84ed821b | ||
|
a56e57ea9b | ||
|
302fdc380d | ||
|
20eda117c2 | ||
|
ad0b0c640a | ||
|
9a9f16ab3b | ||
|
67211293ab | ||
|
0b620f304c | ||
|
3c58da4f19 | ||
|
1cece84c50 | ||
|
69cf23d516 | ||
|
21f7dce24d | ||
|
da74981da3 | ||
|
e4e82382a0 | ||
|
e9822d8efc | ||
|
b087315336 | ||
|
29c861029a | ||
|
a1fa7f021e | ||
|
16909c6274 | ||
|
f381942942 | ||
|
b419ebcce8 | ||
|
5724f5ad54 | ||
|
e522af0d30 | ||
|
0a12acb21e | ||
|
237f55187a | ||
|
7163312453 | ||
|
bc847738ca | ||
|
6e319e7d5d | ||
|
e9fe1226be | ||
|
7f87bd95fb | ||
|
eca17040a8 | ||
|
6a7313bb87 | ||
|
992c04ee9f | ||
|
63d982abe2 | ||
|
66754831ab | ||
|
f6bd33a6c7 | ||
|
24e81f2952 | ||
|
fb68e8ec88 | ||
|
42094309d9 | ||
|
65509e965e | ||
|
3e3ed6e20f | ||
|
9b7a3aba52 | ||
|
d418e2444a | ||
|
ad2469e77d | ||
|
580ad0130e | ||
|
aa8b978f9a | ||
|
7fe76cb84f | ||
|
44f7b9fc5f | ||
|
442dac7b54 | ||
|
2ef2329327 | ||
|
e95b42b57a | ||
|
2dee5b2a47 | ||
|
17e0bbf080 | ||
|
a9ea1fe773 | ||
|
323745a36d | ||
|
17af5070b3 | ||
|
514f668726 | ||
|
a5fa8c5058 | ||
|
3e5681a624 | ||
|
d721fd11f9 | ||
|
d76a6d56cd | ||
|
a1608a1d3c | ||
|
b54982550b | ||
|
d1ae5a93d7 | ||
|
2a65149f2e | ||
|
074dafc216 | ||
|
34f67cb087 | ||
|
dcd097edab | ||
|
0d50ead3d7 | ||
|
fa2f58a1b0 | ||
|
37c1090ee6 | ||
|
df8bcc62c3 | ||
|
e297fb283c | ||
|
22f3d0e08b | ||
|
b53518422b | ||
|
37b68259e2 | ||
|
e838740946 | ||
|
dc4c0eda85 | ||
|
245c2612a1 | ||
|
9e97f5c03f | ||
|
d4bea6c59a | ||
|
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 | ||
|
4653ce8328 | ||
|
2bf9e8fcec | ||
|
0f9677f38a | ||
|
a5ee7ab90d | ||
|
29ae7551a6 | ||
|
6f3b3900e2 | ||
|
bfc9784d47 | ||
|
18cba41000 | ||
|
eb8725d5b7 | ||
|
5b625af798 | ||
|
f33ea7a026 | ||
|
44a85c455c | ||
|
701ee49177 | ||
|
c48d9458d7 | ||
|
4be814857d | ||
|
a4979fe086 | ||
|
47429478a1 | ||
|
ad8112c034 | ||
|
ae6a5488e9 | ||
|
8d6b7bdbe2 | ||
|
9d4396ba36 | ||
|
1a4bc80986 | ||
|
1d69eac73c | ||
|
e402cc2e16 | ||
|
00afdeb441 | ||
|
08841b0f51 | ||
|
54d481ef55 | ||
|
d413b7d2a6 | ||
|
2edc59783f | ||
|
af00f6d309 | ||
|
2b8da35c3b | ||
|
b456c30f0c | ||
|
babc486031 | ||
|
b64f2d360c | ||
|
98569fb679 | ||
|
7fb25d3ff4 | ||
|
0b97beb8db | ||
|
7fcde50bab | ||
|
c124f2c48d | ||
|
9ae8d18bd2 | ||
|
f2c46c0e0d | ||
|
eb7eaa456a | ||
|
9137da0f15 | ||
|
84873a6b62 | ||
|
684c6b645d | ||
|
1ab135cd82 | ||
|
0f3500e097 | ||
|
364e6a0585 | ||
|
eb7631737c | ||
|
b9d1cc0cde | ||
|
fab6b30741 | ||
|
1ae56e78a7 | ||
|
961ab3d4c5 | ||
|
b8c02345f2 | ||
|
c905b2d26e | ||
|
797d9df2e6 | ||
|
29a014957c | ||
|
244156dbde | ||
|
ad6d5a936b | ||
|
13d3722e71 | ||
|
74a7581d70 | ||
|
8c70a3ebf3 |
20
.editorconfig
Executable file
20
.editorconfig
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
# This file is globally distributed to all container image projects from
|
||||||
|
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[{Dockerfile*,**.yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
123
.github/CONTRIBUTING.md
vendored
Executable file
123
.github/CONTRIBUTING.md
vendored
Executable file
@ -0,0 +1,123 @@
|
|||||||
|
# Contributing to code-server
|
||||||
|
|
||||||
|
## Gotchas
|
||||||
|
|
||||||
|
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
|
||||||
|
* Read, and fill the Pull Request template
|
||||||
|
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||||
|
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||||
|
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||||
|
|
||||||
|
## Common files
|
||||||
|
|
||||||
|
| File | Use case |
|
||||||
|
| :----: | --- |
|
||||||
|
| `Dockerfile` | Dockerfile used to build amd64 images |
|
||||||
|
| `Dockerfile.aarch64` | Dockerfile used to build 64bit ARM architectures |
|
||||||
|
| `Dockerfile.armhf` | Dockerfile used to build 32bit ARM architectures |
|
||||||
|
| `Jenkinsfile` | This file is a product of our builder and should not be edited directly. This is used to build the image |
|
||||||
|
| `jenkins-vars.yml` | This file is used to generate the `Jenkinsfile` mentioned above, it only affects the build-process |
|
||||||
|
| `package_versions.txt` | This file is generated as a part of the build-process and should not be edited directly. It lists all the installed packages and their versions |
|
||||||
|
| `README.md` | This file is a product of our builder and should not be edited directly. This displays the readme for the repository and image registries |
|
||||||
|
| `readme-vars.yml` | This file is used to generate the `README.md` |
|
||||||
|
|
||||||
|
## Readme
|
||||||
|
|
||||||
|
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||||
|
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-code-server/edit/master/readme-vars.yml).
|
||||||
|
|
||||||
|
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||||
|
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-code-server)
|
||||||
|
|
||||||
|
### Fixing typos or clarify the text in the readme
|
||||||
|
|
||||||
|
There are variables for multiple parts of the readme, the most common ones are:
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| :----: | --- |
|
||||||
|
| `project_blurb` | This is the short excerpt shown above the project logo. |
|
||||||
|
| `app_setup_block` | This is the text that shows up under "Application Setup" if enabled |
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
The compose and run examples are also generated from these variables.
|
||||||
|
|
||||||
|
We have a [reference file](https://github.com/linuxserver/docker-jenkins-builder/blob/master/vars/_container-vars-blank) in our Jenkins Builder.
|
||||||
|
|
||||||
|
These are prefixed with `param_` for required parameters, or `opt_param` for optional parameters, except for `cap_add`.
|
||||||
|
Remember to enable param, if currently disabled. This differs between parameters, and can be seen in the reference file.
|
||||||
|
|
||||||
|
Devices, environment variables, ports and volumes expects its variables in a certain way.
|
||||||
|
|
||||||
|
### Devices
|
||||||
|
|
||||||
|
```yml
|
||||||
|
param_devices:
|
||||||
|
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
|
||||||
|
opt_param_devices:
|
||||||
|
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Environment variables
|
||||||
|
|
||||||
|
```yml
|
||||||
|
param_env_vars:
|
||||||
|
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
|
||||||
|
opt_param_env_vars:
|
||||||
|
- { env_var: "VERSION", env_value: "latest", desc: "Supported values are LATEST, PLEXPASS or a specific version number." }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ports
|
||||||
|
|
||||||
|
```yml
|
||||||
|
param_ports:
|
||||||
|
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
|
||||||
|
opt_param_ports:
|
||||||
|
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Volumes
|
||||||
|
|
||||||
|
```yml
|
||||||
|
param_volumes:
|
||||||
|
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
|
||||||
|
opt_param_volumes:
|
||||||
|
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing template changes
|
||||||
|
|
||||||
|
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/linuxserver/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
|
||||||
|
|
||||||
|
## Dockerfiles
|
||||||
|
|
||||||
|
We use multiple Dockerfiles in our repos, this is because sometimes some CPU architectures needs different packages to work.
|
||||||
|
If you are proposing additional packages to be added, ensure that you added the packages to all the Dockerfiles in alphabetical order.
|
||||||
|
|
||||||
|
### Testing your changes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/linuxserver/docker-code-server.git
|
||||||
|
cd docker-code-server
|
||||||
|
docker build \
|
||||||
|
--no-cache \
|
||||||
|
--pull \
|
||||||
|
-t linuxserver/code-server:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
```
|
||||||
|
|
||||||
|
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||||
|
|
||||||
|
## Update the changelog
|
||||||
|
|
||||||
|
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-code-server/tree/master/root), add an entry to the changelog
|
||||||
|
|
||||||
|
```yml
|
||||||
|
changelogs:
|
||||||
|
- { date: "DD.MM.YY:", desc: "Added some love to templates" }
|
||||||
|
```
|
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1 +1,2 @@
|
|||||||
|
github: linuxserver
|
||||||
open_collective: linuxserver
|
open_collective: linuxserver
|
||||||
|
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,9 +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. --->
|
||||||
|
|
||||||
<!--- Provide a general summary of the issue in the Title above -->
|
<!--- Provide a general summary of the bug in the Title above -->
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
@ -25,6 +30,7 @@ If you are new to Docker or this application our issue tracker is **ONLY** used
|
|||||||
**OS:**
|
**OS:**
|
||||||
**CPU architecture:** x86_64/arm32/arm64
|
**CPU architecture:** x86_64/arm32/arm64
|
||||||
**How docker service was installed:**
|
**How docker service was installed:**
|
||||||
|
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
|
||||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
||||||
|
|
||||||
## Command used to create docker container (run/create/compose/screenshot)
|
## Command used to create docker container (run/create/compose/screenshot)
|
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 -->
|
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<!--- Before submitting a pull request please check the following -->
|
<!--- Before submitting a pull request please check the following -->
|
||||||
|
|
||||||
<!--- If this is a fix for a typo in code or documentation in 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 -->
|
||||||
<!--- 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/ -->
|
<!--- 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/ -->
|
||||||
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
|
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
|
||||||
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
|
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
|
||||||
@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
We welcome all PR’s though this doesn’t guarantee it will be accepted.
|
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
<!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. -->
|
||||||
|
|
||||||
## Description:
|
## Description:
|
||||||
<!--- Describe your changes in detail -->
|
<!--- Describe your changes in detail -->
|
||||||
|
92
.github/workflows/external_trigger.yml
vendored
Normal file
92
.github/workflows/external_trigger.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
name: External Trigger Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
external-trigger-master:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
|
- name: External Trigger
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
||||||
|
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
||||||
|
exit 0
|
||||||
|
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 "**** Retrieving external version ****"
|
||||||
|
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||')
|
||||||
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
|
echo "**** Can't retrieve external version, exiting ****"
|
||||||
|
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,
|
||||||
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||||
|
echo "**** External version: ${EXT_RELEASE} ****"
|
||||||
|
echo "**** Retrieving last pushed version ****"
|
||||||
|
image="linuxserver/code-server"
|
||||||
|
tag="latest"
|
||||||
|
token=$(curl -sX GET \
|
||||||
|
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fcode-server%3Apull" \
|
||||||
|
| jq -r '.token')
|
||||||
|
multidigest=$(curl -s \
|
||||||
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
|
--header "Authorization: Bearer ${token}" \
|
||||||
|
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||||
|
| jq -r 'first(.manifests[].digest)')
|
||||||
|
digest=$(curl -s \
|
||||||
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
|
--header "Authorization: Bearer ${token}" \
|
||||||
|
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
||||||
|
| jq -r '.config.digest')
|
||||||
|
image_info=$(curl -sL \
|
||||||
|
--header "Authorization: Bearer ${token}" \
|
||||||
|
"https://ghcr.io/v2/${image}/blobs/${digest}" \
|
||||||
|
| jq -r '.container_config')
|
||||||
|
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
|
||||||
|
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
||||||
|
if [ -z "${IMAGE_VERSION}" ]; then
|
||||||
|
echo "**** Can't retrieve last pushed version, exiting ****"
|
||||||
|
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,
|
||||||
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
||||||
|
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||||
|
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||||
|
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
|
||||||
|
else
|
||||||
|
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||||
|
response=$(curl -iX POST \
|
||||||
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
||||||
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
|
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||||
|
echo "**** Sleeping 10 seconds until job starts ****"
|
||||||
|
sleep 10
|
||||||
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
|
buildurl="${buildurl%$'\r'}"
|
||||||
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
|
curl -iX POST \
|
||||||
|
"${buildurl}submitDescription" \
|
||||||
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||||
|
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
|
--data-urlencode "Submit=Submit"
|
||||||
|
echo "**** Notifying Discord ****"
|
||||||
|
TRIGGER_REASON="A version change was detected for 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,
|
||||||
|
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
fi
|
43
.github/workflows/external_trigger_scheduler.yml
vendored
Normal file
43
.github/workflows/external_trigger_scheduler.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: External Trigger Scheduler
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '41 * * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
external-trigger-scheduler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.3
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
|
||||||
|
- name: External Trigger Scheduler
|
||||||
|
run: |
|
||||||
|
echo "**** Branches found: ****"
|
||||||
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
|
echo "**** Pulling the yq docker image ****"
|
||||||
|
docker pull ghcr.io/linuxserver/yq
|
||||||
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
|
do
|
||||||
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
|
echo "**** Evaluating branch ${br} ****"
|
||||||
|
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml \
|
||||||
|
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||||
|
if [ "$br" == "$ls_branch" ]; then
|
||||||
|
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||||
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||||
|
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||||
|
curl -iX POST \
|
||||||
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||||
|
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/external_trigger.yml/dispatches
|
||||||
|
else
|
||||||
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||||
|
fi
|
||||||
|
done
|
13
.github/workflows/greetings.yml
vendored
Executable file
13
.github/workflows/greetings.yml
vendored
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
name: Greetings
|
||||||
|
|
||||||
|
on: [pull_request_target, issues]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
greeting:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/first-interaction@v1
|
||||||
|
with:
|
||||||
|
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-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)!'
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
38
.github/workflows/package_trigger.yml
vendored
Normal file
38
.github/workflows/package_trigger.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Package Trigger Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package-trigger-master:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
|
- name: Package Trigger
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
||||||
|
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
||||||
|
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 ****"
|
||||||
|
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 \
|
||||||
|
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 "**** 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"
|
50
.github/workflows/package_trigger_scheduler.yml
vendored
Normal file
50
.github/workflows/package_trigger_scheduler.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Package Trigger Scheduler
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '00 12 * * 0'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package-trigger-scheduler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.3
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
|
||||||
|
- name: Package Trigger Scheduler
|
||||||
|
run: |
|
||||||
|
echo "**** Branches found: ****"
|
||||||
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
|
echo "**** Pulling the yq docker image ****"
|
||||||
|
docker pull ghcr.io/linuxserver/yq
|
||||||
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
|
do
|
||||||
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
|
echo "**** Evaluating branch ${br} ****"
|
||||||
|
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml \
|
||||||
|
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||||
|
if [ "${br}" == "${ls_branch}" ]; then
|
||||||
|
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||||
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||||
|
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||||
|
triggered_branches="${triggered_branches}${br} "
|
||||||
|
curl -iX POST \
|
||||||
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||||
|
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/package_trigger.yml/dispatches
|
||||||
|
sleep 30
|
||||||
|
else
|
||||||
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||||
|
echo "**** Notifying Discord ****"
|
||||||
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||||
|
"description": "**Package Check Build(s) Triggered for 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 }}
|
23
.github/workflows/stale.yml
vendored
Executable file
23
.github/workflows/stale.yml
vendored
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
name: Mark stale issues and pull requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "30 1 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||||
|
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||||
|
stale-issue-label: 'no-issue-activity'
|
||||||
|
stale-pr-label: 'no-pr-activity'
|
||||||
|
days-before-stale: 30
|
||||||
|
days-before-close: 365
|
||||||
|
exempt-issue-labels: 'awaiting-approval,work-in-progress'
|
||||||
|
exempt-pr-labels: 'awaiting-approval,work-in-progress'
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
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
|
||||||
|
55
Dockerfile
55
Dockerfile
@ -1,10 +1,63 @@
|
|||||||
FROM scratch
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
|
ARG CODE_RELEASE
|
||||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
LABEL maintainer="aptalca"
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
|
# environment settings
|
||||||
|
ENV HOME="/config"
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
echo "**** install node repo ****" && \
|
||||||
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
libatomic1 \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
sudo && \
|
||||||
|
echo "**** install code-server ****" && \
|
||||||
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
|
fi && \
|
||||||
|
mkdir -p /app/code-server && \
|
||||||
|
curl -o \
|
||||||
|
/tmp/code-server.tar.gz -L \
|
||||||
|
"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 \
|
||||||
|
/app/code-server --strip-components=1 && \
|
||||||
|
echo "**** patch 4.0.2 ****" && \
|
||||||
|
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
|
||||||
|
cd /app/code-server && \
|
||||||
|
npm i --production @node-rs/argon2; \
|
||||||
|
fi && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
apt-get purge --auto-remove -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
|
/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/etc/apt/sources.list.d/nodesource.list
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
|
||||||
|
# ports and volumes
|
||||||
|
EXPOSE 8443
|
||||||
|
63
Dockerfile.aarch64
Normal file
63
Dockerfile.aarch64
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
|
||||||
|
|
||||||
|
# set version label
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VERSION
|
||||||
|
ARG CODE_RELEASE
|
||||||
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
|
# environment settings
|
||||||
|
ENV HOME="/config"
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
echo "**** install node repo ****" && \
|
||||||
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
libatomic1 \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
sudo && \
|
||||||
|
echo "**** install code-server ****" && \
|
||||||
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
|
fi && \
|
||||||
|
mkdir -p /app/code-server && \
|
||||||
|
curl -o \
|
||||||
|
/tmp/code-server.tar.gz -L \
|
||||||
|
"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 \
|
||||||
|
/app/code-server --strip-components=1 && \
|
||||||
|
echo "**** patch 4.0.2 ****" && \
|
||||||
|
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
|
||||||
|
cd /app/code-server && \
|
||||||
|
npm i --production @node-rs/argon2; \
|
||||||
|
fi && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
apt-get purge --auto-remove -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
|
/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/etc/apt/sources.list.d/nodesource.list
|
||||||
|
|
||||||
|
# add local files
|
||||||
|
COPY /root /
|
||||||
|
|
||||||
|
# ports and volumes
|
||||||
|
EXPOSE 8443
|
63
Dockerfile.armhf
Normal file
63
Dockerfile.armhf
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
|
||||||
|
|
||||||
|
# set version label
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VERSION
|
||||||
|
ARG CODE_RELEASE
|
||||||
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
|
# environment settings
|
||||||
|
ENV HOME="/config"
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
echo "**** install node repo ****" && \
|
||||||
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
libatomic1 \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
sudo && \
|
||||||
|
echo "**** install code-server ****" && \
|
||||||
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
|
fi && \
|
||||||
|
mkdir -p /app/code-server && \
|
||||||
|
curl -o \
|
||||||
|
/tmp/code-server.tar.gz -L \
|
||||||
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-armv7l.tar.gz" && \
|
||||||
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
|
/app/code-server --strip-components=1 && \
|
||||||
|
echo "**** patch 4.0.2 ****" && \
|
||||||
|
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
|
||||||
|
cd /app/code-server && \
|
||||||
|
npm i --production @node-rs/argon2; \
|
||||||
|
fi && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
apt-get purge --auto-remove -y \
|
||||||
|
build-essential \
|
||||||
|
nodejs && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
|
/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/etc/apt/sources.list.d/nodesource.list
|
||||||
|
|
||||||
|
# add local files
|
||||||
|
COPY /root /
|
||||||
|
|
||||||
|
# ports and volumes
|
||||||
|
EXPOSE 8443
|
624
Jenkinsfile
vendored
624
Jenkinsfile
vendored
@ -16,6 +16,7 @@ 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')
|
||||||
|
SCARF_TOKEN=credentials('scarf_api_key')
|
||||||
CONTAINER_NAME = 'code-server'
|
CONTAINER_NAME = 'code-server'
|
||||||
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
@ -24,8 +25,15 @@ pipeline {
|
|||||||
DEV_DOCKERHUB_IMAGE = 'lsiodev/code-server'
|
DEV_DOCKERHUB_IMAGE = 'lsiodev/code-server'
|
||||||
PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||||
DIST_IMAGE = 'ubuntu'
|
DIST_IMAGE = 'ubuntu'
|
||||||
MULTIARCH='false'
|
MULTIARCH='true'
|
||||||
CI='false'
|
CI='true'
|
||||||
|
CI_WEB='true'
|
||||||
|
CI_PORT='8443'
|
||||||
|
CI_SSL='false'
|
||||||
|
CI_DELAY='120'
|
||||||
|
CI_DOCKERENV='TZ=US/Pacific'
|
||||||
|
CI_AUTH='user:password'
|
||||||
|
CI_WEBPATH=''
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
// Setup all the basic environment variables needed for the build
|
// Setup all the basic environment variables needed for the build
|
||||||
@ -34,7 +42,7 @@ pipeline {
|
|||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = ''
|
env.EXIT_STATUS = ''
|
||||||
env.LS_RELEASE = sh(
|
env.LS_RELEASE = sh(
|
||||||
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':mod-python2 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
env.LS_RELEASE_NOTES = sh(
|
env.LS_RELEASE_NOTES = sh(
|
||||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||||
@ -48,7 +56,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/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md'
|
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.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/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
|
||||||
}
|
}
|
||||||
script{
|
script{
|
||||||
env.LS_RELEASE_NUMBER = sh(
|
env.LS_RELEASE_NUMBER = sh(
|
||||||
@ -91,12 +99,14 @@ pipeline {
|
|||||||
/* ########################
|
/* ########################
|
||||||
External Release Tagging
|
External Release Tagging
|
||||||
######################## */
|
######################## */
|
||||||
// If this is an os release set release type to none to indicate no external release
|
// If this is a custom command to determine version use that command
|
||||||
stage("Set ENV os"){
|
stage("Set tag custom bash"){
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = env.PACKAGE_TAG
|
env.EXT_RELEASE = sh(
|
||||||
env.RELEASE_LINK = 'none'
|
script: ''' curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||' ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
env.RELEASE_LINK = 'custom_command'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,48 +117,76 @@ pipeline {
|
|||||||
env.EXT_RELEASE_CLEAN = sh(
|
env.EXT_RELEASE_CLEAN = sh(
|
||||||
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
|
|
||||||
|
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
|
||||||
|
if (semver.find()) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else {
|
||||||
|
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/
|
||||||
|
if (semver.find()) {
|
||||||
|
if (semver[0][3]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else if (!semver[0][3] && !semver[0][4]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${(new Date()).format('YYYYMMdd')}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a mod-python2 build use live docker endpoints
|
|
||||||
|
if (env.SEMVER != null) {
|
||||||
|
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
|
||||||
|
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
|
||||||
|
}
|
||||||
|
println("SEMVER: ${env.SEMVER}")
|
||||||
|
} else {
|
||||||
|
println("No SEMVER detected")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a master build use live docker endpoints
|
||||||
stage("Set ENV live build"){
|
stage("Set ENV live build"){
|
||||||
when {
|
when {
|
||||||
branch "mod-python2"
|
branch "master"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.IMAGE = env.DOCKERHUB_IMAGE
|
env.IMAGE = env.DOCKERHUB_IMAGE
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME
|
||||||
env.GITHUBIMAGE = 'docker.pkg.github.com/' + env.LS_USER + '/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
} 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a dev build use dev docker endpoints
|
// If this is a dev build use dev docker endpoints
|
||||||
stage("Set ENV dev build"){
|
stage("Set ENV dev build"){
|
||||||
when {
|
when {
|
||||||
not {branch "mod-python2"}
|
not {branch "master"}
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
|
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME
|
||||||
env.GITHUBIMAGE = 'docker.pkg.github.com/' + env.LS_USER + '/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
} 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.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/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,15 +199,17 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.IMAGE = env.PR_DOCKERHUB_IMAGE
|
env.IMAGE = env.PR_DOCKERHUB_IMAGE
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
env.GITHUBIMAGE = 'docker.pkg.github.com/' + env.LS_USER + '/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||||
} 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.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
|
||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||||
}
|
}
|
||||||
@ -182,24 +222,24 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
string(credentialsId: 'spaces-key', variable: 'DO_KEY'),
|
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
|
||||||
string(credentialsId: 'spaces-secret', variable: 'DO_SECRET')
|
string(credentialsId: 'ci-tests-s3-secret-access-key', variable: 'S3_SECRET')
|
||||||
]) {
|
]) {
|
||||||
script{
|
script{
|
||||||
env.SHELLCHECK_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
|
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
|
||||||
}
|
}
|
||||||
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
|
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
docker pull lsiodev/spaces-file-upload:latest
|
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
|
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
|
||||||
-e FILE_NAME="shellcheck-result.xml" \
|
-e FILE_NAME="shellcheck-result.xml" \
|
||||||
-e MIMETYPE="text/xml" \
|
-e MIMETYPE="text/xml" \
|
||||||
-v ${WORKSPACE}:/mnt \
|
-v ${WORKSPACE}:/mnt \
|
||||||
-e SECRET_KEY=\"${DO_SECRET}\" \
|
-e SECRET_KEY=\"${S3_SECRET}\" \
|
||||||
-e ACCESS_KEY=\"${DO_KEY}\" \
|
-e ACCESS_KEY=\"${S3_KEY}\" \
|
||||||
-t lsiodev/spaces-file-upload:latest \
|
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
|
||||||
python /upload.py'''
|
python /upload.py'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,7 +247,7 @@ pipeline {
|
|||||||
// Use helper containers to render templated files
|
// Use helper containers to render templated files
|
||||||
stage('Update-Templates') {
|
stage('Update-Templates') {
|
||||||
when {
|
when {
|
||||||
branch "mod-python2"
|
branch "master"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
expression {
|
expression {
|
||||||
env.CONTAINER_NAME != null
|
env.CONTAINER_NAME != null
|
||||||
@ -217,20 +257,67 @@ pipeline {
|
|||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull linuxserver/jenkins-builder:latest
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=mod-python2 -v ${TEMPDIR}:/ansible/jenkins 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
|
||||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
# Stage 1 - Jenkinsfile update
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||||
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
|
||||||
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]]; 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 mod-python2
|
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
|
||||||
|
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)
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
|
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
|
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; 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}
|
||||||
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||||
|
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
|
||||||
@ -240,13 +327,34 @@ 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}-logo.png ]]; then
|
||||||
|
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.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
|
||||||
|
cd ${TEMPDIR}/unraid/templates/
|
||||||
|
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||||
|
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||||
|
git add -u unraid/${CONTAINER_NAME}.xml
|
||||||
|
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||||
|
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||||
|
else
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||||
|
git add unraid/${CONTAINER_NAME}.xml
|
||||||
|
git commit -m 'Bot Updating Unraid Template'
|
||||||
|
fi
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
|
||||||
|
fi
|
||||||
rm -Rf ${TEMPDIR}'''
|
rm -Rf ${TEMPDIR}'''
|
||||||
script{
|
script{
|
||||||
env.FILES_UPDATED = sh(
|
env.FILES_UPDATED = sh(
|
||||||
@ -258,7 +366,7 @@ pipeline {
|
|||||||
// Exit the build if the Templated files were just updated
|
// Exit the build if the Templated files were just updated
|
||||||
stage('Template-exit') {
|
stage('Template-exit') {
|
||||||
when {
|
when {
|
||||||
branch "mod-python2"
|
branch "master"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'FILES_UPDATED', value: 'true'
|
environment name: 'FILES_UPDATED', value: 'true'
|
||||||
expression {
|
expression {
|
||||||
@ -291,31 +399,94 @@ pipeline {
|
|||||||
"visibility":"public"}' '''
|
"visibility":"public"}' '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* #######################
|
||||||
|
Scarf.sh package registry
|
||||||
|
####################### */
|
||||||
|
// Add package to Scarf.sh and set permissions
|
||||||
|
stage("Scarf.sh package registry"){
|
||||||
|
when {
|
||||||
|
branch "master"
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/code-server") | .uuid')
|
||||||
|
if [ -z "${PACKAGE_UUID}" ]; then
|
||||||
|
echo "Adding package to Scarf.sh"
|
||||||
|
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
|
||||||
|
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"linuxserver/code-server",\
|
||||||
|
"shortDescription":"example description",\
|
||||||
|
"libraryType":"docker",\
|
||||||
|
"website":"https://github.com/linuxserver/docker-code-server",\
|
||||||
|
"backendUrl":"https://ghcr.io/linuxserver/code-server",\
|
||||||
|
"publicUrl":"https://lscr.io/linuxserver/code-server"}' || :
|
||||||
|
else
|
||||||
|
echo "Package already exists on Scarf.sh"
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
/* ###############
|
/* ###############
|
||||||
Build Container
|
Build Container
|
||||||
############### */
|
############### */
|
||||||
// Build Docker container for push to LS Repo
|
// Build Docker container for push to LS Repo
|
||||||
stage('Build-Single') {
|
stage('Build-Single') {
|
||||||
when {
|
when {
|
||||||
environment name: 'MULTIARCH', value: 'false'
|
expression {
|
||||||
|
env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true'
|
||||||
|
}
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
|
echo "Running on node: ${NODE_NAME}"
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
sh "docker build \
|
||||||
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-code-server/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Code-server\" \
|
||||||
|
--label \"org.opencontainers.image.description=[Code-server](https://coder.com) 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.\" \
|
||||||
|
--no-cache --pull -t ${IMAGE}:${META_TAG} \
|
||||||
|
--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
|
||||||
stage('Build-Multi') {
|
stage('Build-Multi') {
|
||||||
when {
|
when {
|
||||||
|
allOf {
|
||||||
environment name: 'MULTIARCH', value: 'true'
|
environment name: 'MULTIARCH', value: 'true'
|
||||||
|
expression { params.PACKAGE_CHECK == 'false' }
|
||||||
|
}
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
parallel {
|
parallel {
|
||||||
stage('Build X86') {
|
stage('Build X86') {
|
||||||
steps {
|
steps {
|
||||||
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
echo "Running on node: ${NODE_NAME}"
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
sh "docker build \
|
||||||
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-code-server/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Code-server\" \
|
||||||
|
--label \"org.opencontainers.image.description=[Code-server](https://coder.com) 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.\" \
|
||||||
|
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
||||||
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARMHF') {
|
stage('Build ARMHF') {
|
||||||
@ -323,26 +494,33 @@ pipeline {
|
|||||||
label 'ARMHF'
|
label 'ARMHF'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo "Running on node: ${NODE_NAME}"
|
||||||
[
|
echo 'Logging into Github'
|
||||||
$class: 'UsernamePasswordMultiBinding',
|
|
||||||
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
|
||||||
usernameVariable: 'DOCKERUSER',
|
|
||||||
passwordVariable: 'DOCKERPASS'
|
|
||||||
]
|
|
||||||
]) {
|
|
||||||
echo 'Logging into DockerHub'
|
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --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 \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
sh "docker push lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-code-server/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Code-server\" \
|
||||||
|
--label \"org.opencontainers.image.description=[Code-server](https://coder.com) 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.\" \
|
||||||
|
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||||
|
--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}"
|
||||||
|
retry(5) {
|
||||||
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
|
}
|
||||||
sh '''docker rmi \
|
sh '''docker rmi \
|
||||||
${IMAGE}:arm32v7-${META_TAG} \
|
${IMAGE}:arm32v7-${META_TAG} \
|
||||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARM64') {
|
stage('Build ARM64') {
|
||||||
@ -350,29 +528,142 @@ pipeline {
|
|||||||
label 'ARM64'
|
label 'ARM64'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo "Running on node: ${NODE_NAME}"
|
||||||
[
|
echo 'Logging into Github'
|
||||||
$class: 'UsernamePasswordMultiBinding',
|
|
||||||
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
|
||||||
usernameVariable: 'DOCKERUSER',
|
|
||||||
passwordVariable: 'DOCKERPASS'
|
|
||||||
]
|
|
||||||
]) {
|
|
||||||
echo 'Logging into DockerHub'
|
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --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 \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-code-server/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-code-server\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Code-server\" \
|
||||||
|
--label \"org.opencontainers.image.description=[Code-server](https://coder.com) 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.\" \
|
||||||
|
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||||
|
--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}"
|
||||||
|
retry(5) {
|
||||||
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
|
}
|
||||||
sh '''docker rmi \
|
sh '''docker rmi \
|
||||||
${IMAGE}:arm64v8-${META_TAG} \
|
${IMAGE}:arm64v8-${META_TAG} \
|
||||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Take the image we just built and dump package versions for comparison
|
||||||
|
stage('Update-packages') {
|
||||||
|
when {
|
||||||
|
branch "master"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
|
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||||
|
fi
|
||||||
|
if [ "${DIST_IMAGE}" == "alpine" ]; then
|
||||||
|
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||||
|
apk info -v > /tmp/package_versions.txt && \
|
||||||
|
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||||
|
chmod 777 /tmp/package_versions.txt'
|
||||||
|
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
|
||||||
|
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||||
|
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
|
||||||
|
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||||
|
chmod 777 /tmp/package_versions.txt'
|
||||||
|
elif [ "${DIST_IMAGE}" == "fedora" ]; then
|
||||||
|
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||||
|
rpm -qa > /tmp/package_versions.txt && \
|
||||||
|
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||||
|
chmod 777 /tmp/package_versions.txt'
|
||||||
|
elif [ "${DIST_IMAGE}" == "arch" ]; then
|
||||||
|
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||||
|
pacman -Q > /tmp/package_versions.txt && \
|
||||||
|
chmod 777 /tmp/package_versions.txt'
|
||||||
|
fi
|
||||||
|
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
||||||
|
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||||
|
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||||
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||||
|
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
||||||
|
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||||
|
cd ${TEMPDIR}/${LS_REPO}/
|
||||||
|
wait
|
||||||
|
git add package_versions.txt
|
||||||
|
git commit -m 'Bot Updating Package Versions'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Package tag updated, stopping build process"
|
||||||
|
else
|
||||||
|
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Package tag is same as previous continue with build process"
|
||||||
|
fi
|
||||||
|
rm -Rf ${TEMPDIR}'''
|
||||||
|
script{
|
||||||
|
env.PACKAGE_UPDATED = sh(
|
||||||
|
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Exit the build if the package file was just updated
|
||||||
|
stage('PACKAGE-exit') {
|
||||||
|
when {
|
||||||
|
branch "master"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "Packages were updated. Cleaning up the image and exiting."
|
||||||
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
|
fi'''
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Exit the build if this is just a package check and there are no changes to push
|
||||||
|
stage('PACKAGECHECK-exit') {
|
||||||
|
when {
|
||||||
|
branch "master"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
expression {
|
||||||
|
params.PACKAGE_CHECK == 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "There are no package updates. Cleaning up the image and exiting."
|
||||||
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
|
fi'''
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* #######
|
/* #######
|
||||||
Testing
|
Testing
|
||||||
@ -385,20 +676,20 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
string(credentialsId: 'spaces-key', variable: 'DO_KEY'),
|
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
|
||||||
string(credentialsId: 'spaces-secret', variable: 'DO_SECRET')
|
string(credentialsId: 'ci-tests-s3-secret-access-key ', variable: 'S3_SECRET')
|
||||||
]) {
|
]) {
|
||||||
script{
|
script{
|
||||||
env.CI_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
docker pull lsiodev/ci:latest
|
docker pull ghcr.io/linuxserver/ci:latest
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
fi
|
fi
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--shm-size=1gb \
|
--shm-size=1gb \
|
||||||
@ -410,15 +701,15 @@ pipeline {
|
|||||||
-e PORT=\"${CI_PORT}\" \
|
-e PORT=\"${CI_PORT}\" \
|
||||||
-e SSL=\"${CI_SSL}\" \
|
-e SSL=\"${CI_SSL}\" \
|
||||||
-e BASE=\"${DIST_IMAGE}\" \
|
-e BASE=\"${DIST_IMAGE}\" \
|
||||||
-e SECRET_KEY=\"${DO_SECRET}\" \
|
-e SECRET_KEY=\"${S3_SECRET}\" \
|
||||||
-e ACCESS_KEY=\"${DO_KEY}\" \
|
-e ACCESS_KEY=\"${S3_KEY}\" \
|
||||||
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
|
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
|
||||||
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
||||||
-e WEB_AUTH=\"${CI_AUTH}\" \
|
-e WEB_AUTH=\"${CI_AUTH}\" \
|
||||||
-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 lsiodev/ci:latest \
|
-t ghcr.io/linuxserver/ci:latest \
|
||||||
python /ci/ci.py'''
|
python /ci/ci.py'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -447,22 +738,38 @@ pipeline {
|
|||||||
passwordVariable: 'QUAYPASS'
|
passwordVariable: 'QUAYPASS'
|
||||||
]
|
]
|
||||||
]) {
|
]) {
|
||||||
|
retry(5) {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
|
||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||||
echo $GITHUB_TOKEN | docker login docker.pkg.github.com -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
for PUSHIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
|
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:mod-python2
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||||
docker push ${PUSHIMAGE}:mod-python2
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
|
docker push ${PUSHIMAGE}:latest
|
||||||
docker push ${PUSHIMAGE}:${META_TAG}
|
docker push ${PUSHIMAGE}:${META_TAG}
|
||||||
|
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
|
'''
|
||||||
|
}
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:${META_TAG} \
|
${DELETEIMAGE}:${META_TAG} \
|
||||||
${DELETEIMAGE}:mod-python2 || :
|
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||||
|
${DELETEIMAGE}:latest || :
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker rmi ${DELETEIMAGE}:${SEMVER} || :
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@ -489,72 +796,97 @@ pipeline {
|
|||||||
passwordVariable: 'QUAYPASS'
|
passwordVariable: 'QUAYPASS'
|
||||||
]
|
]
|
||||||
]) {
|
]) {
|
||||||
|
retry(5) {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
|
||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||||
echo $GITHUB_TOKEN | docker login docker.pkg.github.com -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
if [ "${CI}" == "false" ]; then
|
if [ "${CI}" == "false" ]; then
|
||||||
docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
fi
|
fi
|
||||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}"; do
|
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-mod-python2
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
|
||||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-mod-python2
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
|
||||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-mod-python2
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
fi
|
||||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:amd64-mod-python2
|
docker push ${MANIFESTIMAGE}:amd64-latest
|
||||||
docker push ${MANIFESTIMAGE}:arm32v7-mod-python2
|
docker push ${MANIFESTIMAGE}:arm32v7-latest
|
||||||
docker push ${MANIFESTIMAGE}:arm64v8-mod-python2
|
docker push ${MANIFESTIMAGE}:arm64v8-latest
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:mod-python2 || :
|
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
docker manifest create ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:amd64-mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2
|
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 --os linux --arch arm
|
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2 --os linux --arch arm64 --variant v8
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
fi
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||||
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}:mod-python2
|
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 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
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||||
|
fi
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||||
done
|
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||||
for LEGACYIMAGE in "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
if [ -n "${SEMVER}" ]; then
|
||||||
docker tag ${IMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:amd64-${META_TAG}
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
fi
|
||||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
|
||||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:mod-python2
|
|
||||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:${META_TAG}
|
|
||||||
docker tag ${LEGACYIMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-mod-python2
|
|
||||||
docker tag ${LEGACYIMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-mod-python2
|
|
||||||
docker push ${LEGACYIMAGE}:amd64-${META_TAG}
|
|
||||||
docker push ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
|
||||||
docker push ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
|
||||||
docker push ${LEGACYIMAGE}:mod-python2
|
|
||||||
docker push ${LEGACYIMAGE}:${META_TAG}
|
|
||||||
docker push ${LEGACYIMAGE}:arm32v7-mod-python2
|
|
||||||
docker push ${LEGACYIMAGE}:arm64v8-mod-python2
|
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||||
${DELETEIMAGE}:amd64-mod-python2 \
|
${DELETEIMAGE}:amd64-latest \
|
||||||
|
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-mod-python2 \
|
${DELETEIMAGE}:arm32v7-latest \
|
||||||
|
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-mod-python2 || :
|
${DELETEIMAGE}:arm64v8-latest \
|
||||||
|
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker rmi \
|
||||||
|
${DELETEIMAGE}:amd64-${SEMVER} \
|
||||||
|
${DELETEIMAGE}:arm32v7-${SEMVER} \
|
||||||
|
${DELETEIMAGE}:arm64v8-${SEMVER} || :
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
docker rmi \
|
docker rmi \
|
||||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :
|
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -562,7 +894,7 @@ pipeline {
|
|||||||
// If this is a public release tag it in the LS Github
|
// If this is a public release tag it in the LS Github
|
||||||
stage('Github-Tag-Push-Release') {
|
stage('Github-Tag-Push-Release') {
|
||||||
when {
|
when {
|
||||||
branch "mod-python2"
|
branch "master"
|
||||||
expression {
|
expression {
|
||||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
}
|
}
|
||||||
@ -570,21 +902,21 @@ 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 mod-python2",\
|
"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
|
||||||
echo "Updating base packages to ${PACKAGE_TAG}" > 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": "mod-python2",\
|
"target_commitish": "master",\
|
||||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
"name": "'${META_TAG}'",\
|
||||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
|
||||||
printf '","draft": false,"prerelease": true}' >> 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'''
|
||||||
}
|
}
|
||||||
@ -605,14 +937,20 @@ pipeline {
|
|||||||
]
|
]
|
||||||
]) {
|
]) {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
docker pull lsiodev/readme-sync
|
set -e
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
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 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 \
|
||||||
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
|
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
|
||||||
-e DOCKER_REPOSITORY=${IMAGE} \
|
-e DOCKER_REPOSITORY=${IMAGE} \
|
||||||
-e GIT_BRANCH=master \
|
-e GIT_BRANCH=master \
|
||||||
lsiodev/readme-sync bash -c 'node sync' '''
|
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
|
||||||
|
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
|
||||||
|
rm -Rf ${TEMPDIR} '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
295
README.md
295
README.md
@ -1,20 +1,289 @@
|
|||||||
[linuxserverurl]: https://linuxserver.io
|
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||||
[forumurl]: https://forum.linuxserver.io
|
<!-- Please read the https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
|
||||||
|
|
||||||
[][linuxserverurl]
|
[](https://linuxserver.io)
|
||||||
|
|
||||||
## Contact information:-
|
[](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://discourse.linuxserver.io "post on our community forum.")
|
||||||
|
[](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
|
||||||
|
[](https://github.com/linuxserver "view the source for all of our repositories.")
|
||||||
|
[](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
|
||||||
|
|
||||||
| Type | Address/Details |
|
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
|
||||||
| :---: | --- |
|
|
||||||
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
|
||||||
| Forum | [Linuserver.io forum][forumurl] |
|
|
||||||
|
|
||||||
|
* regular and timely application updates
|
||||||
|
* easy user mappings (PGID, PUID)
|
||||||
|
* custom base image with s6 overlay
|
||||||
|
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
|
||||||
|
* regular security updates
|
||||||
|
|
||||||
The code in this branch is not meant for direct consumption. It is a modification layer to add python2 into `linuxserver/code-server`
|
Find us at:
|
||||||
|
|
||||||
The following line is only in this repo for release messaging:
|
* [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.
|
||||||
|
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
||||||
|
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
|
||||||
|
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
||||||
|
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
||||||
|
|
||||||
- { date: "01.01.50:", desc: "I am the release message for this custom branch" }
|
# [linuxserver/code-server](https://github.com/linuxserver/docker-code-server)
|
||||||
|
|
||||||
|
[](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fcode-server)
|
||||||
|
[](https://github.com/linuxserver/docker-code-server)
|
||||||
|
[](https://github.com/linuxserver/docker-code-server/releases)
|
||||||
|
[](https://github.com/linuxserver/docker-code-server/packages)
|
||||||
|
[](https://gitlab.com/linuxserver.io/docker-code-server/container_registry)
|
||||||
|
[](https://quay.io/repository/linuxserver.io/code-server)
|
||||||
|
[](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
|
[](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
|
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/)
|
||||||
|
[](https://ci-tests.linuxserver.io/linuxserver/code-server/latest/index.html)
|
||||||
|
|
||||||
|
[Code-server](https://coder.com) 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.
|
||||||
|
|
||||||
|
[](https://coder.com)
|
||||||
|
|
||||||
|
## 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/).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
The architectures supported by this image are:
|
||||||
|
|
||||||
|
| Architecture | Available | Tag |
|
||||||
|
| :----: | :----: | ---- |
|
||||||
|
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||||
|
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||||
|
| armhf| ✅ | arm32v7-\<version tag\> |
|
||||||
|
|
||||||
|
## Version Tags
|
||||||
|
|
||||||
|
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
|
||||||
|
|
||||||
|
| Tag | Available | Description |
|
||||||
|
| :----: | :----: |--- |
|
||||||
|
| latest | ✅ | Stable releases |
|
||||||
|
| focal | ✅ | DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal |
|
||||||
|
| development | ✅ | DEPRECATED (no longer updated) - Prereleases from their GitHub |
|
||||||
|
|
||||||
|
## Application Setup
|
||||||
|
|
||||||
|
Access the webui at `http://<your-ip>:8443`.
|
||||||
|
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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git config --global user.name "username"
|
||||||
|
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).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Here are some example snippets to help you get started creating a container.
|
||||||
|
|
||||||
|
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
version: "2.1"
|
||||||
|
services:
|
||||||
|
code-server:
|
||||||
|
image: lscr.io/linuxserver/code-server:latest
|
||||||
|
container_name: code-server
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/London
|
||||||
|
- PASSWORD=password #optional
|
||||||
|
- HASHED_PASSWORD= #optional
|
||||||
|
- SUDO_PASSWORD=password #optional
|
||||||
|
- SUDO_PASSWORD_HASH= #optional
|
||||||
|
- PROXY_DOMAIN=code-server.my.domain #optional
|
||||||
|
- DEFAULT_WORKSPACE=/config/workspace #optional
|
||||||
|
volumes:
|
||||||
|
- /path/to/appdata/config:/config
|
||||||
|
ports:
|
||||||
|
- 8443:8443
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
|
||||||
|
### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/))
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
|
--name=code-server \
|
||||||
|
-e PUID=1000 \
|
||||||
|
-e PGID=1000 \
|
||||||
|
-e TZ=Europe/London \
|
||||||
|
-e PASSWORD=password `#optional` \
|
||||||
|
-e HASHED_PASSWORD= `#optional` \
|
||||||
|
-e SUDO_PASSWORD=password `#optional` \
|
||||||
|
-e SUDO_PASSWORD_HASH= `#optional` \
|
||||||
|
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
|
||||||
|
-e DEFAULT_WORKSPACE=/config/workspace `#optional` \
|
||||||
|
-p 8443:8443 \
|
||||||
|
-v /path/to/appdata/config:/config \
|
||||||
|
--restart unless-stopped \
|
||||||
|
lscr.io/linuxserver/code-server:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
|
||||||
|
|
||||||
|
| Parameter | Function |
|
||||||
|
| :----: | --- |
|
||||||
|
| `-p 8443` | web gui |
|
||||||
|
| `-e PUID=1000` | for UserID - 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 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_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 DEFAULT_WORKSPACE=/config/workspace` | If this optional variable is set, code-server will open this directory by default |
|
||||||
|
| `-v /config` | Contains all relevant configuration files. |
|
||||||
|
|
||||||
|
## Environment variables from files (Docker secrets)
|
||||||
|
|
||||||
|
You can set any environment variable from a file by using a special prepend `FILE__`.
|
||||||
|
|
||||||
|
As an example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||||||
|
```
|
||||||
|
|
||||||
|
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
||||||
|
|
||||||
|
## Umask for running applications
|
||||||
|
|
||||||
|
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
|
||||||
|
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
|
||||||
|
|
||||||
|
## 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`.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ id username
|
||||||
|
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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.")
|
||||||
|
|
||||||
|
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
|
||||||
|
|
||||||
|
## Support Info
|
||||||
|
|
||||||
|
* Shell access whilst the container is running: `docker exec -it code-server /bin/bash`
|
||||||
|
* To monitor the logs of the container in realtime: `docker logs -f code-server`
|
||||||
|
* container version number
|
||||||
|
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server`
|
||||||
|
* image version number
|
||||||
|
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server:latest`
|
||||||
|
|
||||||
|
## Updating Info
|
||||||
|
|
||||||
|
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
|
||||||
|
|
||||||
|
Below are the instructions for updating containers:
|
||||||
|
|
||||||
|
### Via Docker Compose
|
||||||
|
|
||||||
|
* Update all images: `docker-compose pull`
|
||||||
|
* or update a single image: `docker-compose pull code-server`
|
||||||
|
* Let compose update all containers as necessary: `docker-compose up -d`
|
||||||
|
* or update a single container: `docker-compose up -d code-server`
|
||||||
|
* You can also remove the old dangling images: `docker image prune`
|
||||||
|
|
||||||
|
### Via Docker Run
|
||||||
|
|
||||||
|
* Update the image: `docker pull lscr.io/linuxserver/code-server:latest`
|
||||||
|
* Stop the running container: `docker stop code-server`
|
||||||
|
* Delete the container: `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)
|
||||||
|
* You can also remove the old dangling images: `docker image prune`
|
||||||
|
|
||||||
|
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
|
||||||
|
|
||||||
|
* Pull the latest image at its tag and replace it with the same env variables in one run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
containrrr/watchtower \
|
||||||
|
--run-once 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)
|
||||||
|
|
||||||
|
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||||
|
|
||||||
|
## Building locally
|
||||||
|
|
||||||
|
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/linuxserver/docker-code-server.git
|
||||||
|
cd docker-code-server
|
||||||
|
docker build \
|
||||||
|
--no-cache \
|
||||||
|
--pull \
|
||||||
|
-t lscr.io/linuxserver/code-server:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
```
|
||||||
|
|
||||||
|
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||||
|
|
||||||
|
## Versions
|
||||||
|
|
||||||
|
* **20.02.22:** - Install using the official tarballs.
|
||||||
|
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
|
||||||
|
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
|
||||||
|
* **29.11.21:** - Rebase to Ubuntu focal.
|
||||||
|
* **16.09.21:** - Fix slow `chown` on large workspace (contents of workspace folder no longer chowned).
|
||||||
|
* **11.07.21:** - Bump node to 14 to fix builds
|
||||||
|
* **08.05.21:** - Fix doc link
|
||||||
|
* **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.
|
||||||
|
* **21.05.20:** - Shrink images, install via yarn, fix arm32v7 build.
|
||||||
|
* **18.05.20:** - Switch to multi-arch images, install via npm.
|
||||||
|
* **29.04.20:** - Update start arguments.
|
||||||
|
* **01.04.20:** - Structural changes required for v3.
|
||||||
|
* **17.01.20:** - Fix artifact url retrieval from github.
|
||||||
|
* **24.10.19:** - Upgrade to v2 builds.
|
||||||
|
* **28.09.19:** - Update project logo.
|
||||||
|
* **21.09.19:** - Add development builds/tag.
|
||||||
|
* **09.07.19:** - Add optional sudo access.
|
||||||
|
* **01.07.19:** - Add nano.
|
||||||
|
* **24.06.19:** - Initial Release.
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-code-server
|
project_name: docker-code-server
|
||||||
external_type: os
|
external_type: na
|
||||||
release_type: prerelease
|
custom_version_command: "curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||'"
|
||||||
release_tag: mod-python2
|
release_type: stable
|
||||||
ls_branch: mod-python2
|
release_tag: latest
|
||||||
skip_package_check: true
|
ls_branch: master
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- CONTAINER_NAME = 'code-server'
|
- CONTAINER_NAME = 'code-server'
|
||||||
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
@ -16,5 +16,12 @@ repo_vars:
|
|||||||
- DEV_DOCKERHUB_IMAGE = 'lsiodev/code-server'
|
- DEV_DOCKERHUB_IMAGE = 'lsiodev/code-server'
|
||||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
- PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||||
- DIST_IMAGE = 'ubuntu'
|
- DIST_IMAGE = 'ubuntu'
|
||||||
- MULTIARCH='false'
|
- MULTIARCH='true'
|
||||||
- CI='false'
|
- CI='true'
|
||||||
|
- CI_WEB='true'
|
||||||
|
- CI_PORT='8443'
|
||||||
|
- CI_SSL='false'
|
||||||
|
- CI_DELAY='120'
|
||||||
|
- CI_DOCKERENV='TZ=US/Pacific'
|
||||||
|
- CI_AUTH='user:password'
|
||||||
|
- CI_WEBPATH=''
|
||||||
|
176
package_versions.txt
Executable file
176
package_versions.txt
Executable file
@ -0,0 +1,176 @@
|
|||||||
|
adduser3.118ubuntu2
|
||||||
|
apt2.0.9
|
||||||
|
apt-utils2.0.9
|
||||||
|
base-files11ubuntu5.5
|
||||||
|
base-passwd3.5.47
|
||||||
|
bash5.0-6ubuntu1.1
|
||||||
|
bsdutils1:2.34-0.1ubuntu9.3
|
||||||
|
bzip21.0.8-2
|
||||||
|
ca-certificates20211016~20.04.1
|
||||||
|
coreutils8.30-3ubuntu2
|
||||||
|
curl7.68.0-1ubuntu2.12
|
||||||
|
dash0.5.10.2-6
|
||||||
|
debconf1.5.73
|
||||||
|
debianutils4.9.1
|
||||||
|
diffutils1:3.7-3
|
||||||
|
dirmngr2.2.19-3ubuntu2.2
|
||||||
|
dpkg1.19.7ubuntu3
|
||||||
|
e2fsprogs1.45.5-2ubuntu1
|
||||||
|
fdisk2.34-0.1ubuntu9.3
|
||||||
|
findutils4.7.0-1ubuntu1
|
||||||
|
gcc-10-base10.3.0-1ubuntu1~20.04
|
||||||
|
git1:2.25.1-1ubuntu3.5
|
||||||
|
git-man1:2.25.1-1ubuntu3.5
|
||||||
|
gnupg2.2.19-3ubuntu2.2
|
||||||
|
gnupg-l10n2.2.19-3ubuntu2.2
|
||||||
|
gnupg-utils2.2.19-3ubuntu2.2
|
||||||
|
gpg2.2.19-3ubuntu2.2
|
||||||
|
gpg-agent2.2.19-3ubuntu2.2
|
||||||
|
gpgconf2.2.19-3ubuntu2.2
|
||||||
|
gpgsm2.2.19-3ubuntu2.2
|
||||||
|
gpgv2.2.19-3ubuntu2.2
|
||||||
|
gpg-wks-client2.2.19-3ubuntu2.2
|
||||||
|
gpg-wks-server2.2.19-3ubuntu2.2
|
||||||
|
grep3.4-1
|
||||||
|
gzip1.10-0ubuntu4
|
||||||
|
hostname3.23
|
||||||
|
init-system-helpers1.57
|
||||||
|
jq1.6-1ubuntu0.20.04.1
|
||||||
|
krb5-locales1.17-6ubuntu4.1
|
||||||
|
less551-1ubuntu0.1
|
||||||
|
libacl12.2.53-6
|
||||||
|
libapt-pkg6.02.0.9
|
||||||
|
libasn1-8-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libassuan02.5.3-7ubuntu2
|
||||||
|
libatomic110.3.0-1ubuntu1~20.04
|
||||||
|
libattr11:2.4.48-5
|
||||||
|
libaudit11:2.8.5-2ubuntu6
|
||||||
|
libaudit-common1:2.8.5-2ubuntu6
|
||||||
|
libblkid12.34-0.1ubuntu9.3
|
||||||
|
libbrotli11.0.7-6ubuntu0.1
|
||||||
|
libbsd00.10.0-1
|
||||||
|
libbz2-1.01.0.8-2
|
||||||
|
libc62.31-0ubuntu9.9
|
||||||
|
libcap-ng00.7.9-2.1build1
|
||||||
|
libc-bin2.31-0ubuntu9.7
|
||||||
|
libcbor0.60.6.0-0ubuntu1
|
||||||
|
libcom-err21.45.5-2ubuntu1
|
||||||
|
libcrypt11:4.4.10-10ubuntu4
|
||||||
|
libcurl3-gnutls7.68.0-1ubuntu2.12
|
||||||
|
libcurl47.68.0-1ubuntu2.12
|
||||||
|
libdb5.35.3.28+dfsg1-0.6ubuntu2
|
||||||
|
libdebconfclient00.251ubuntu1
|
||||||
|
libedit23.1-20191231-1
|
||||||
|
liberror-perl0.17029-1
|
||||||
|
libexpat12.2.9-1ubuntu0.4
|
||||||
|
libext2fs21.45.5-2ubuntu1
|
||||||
|
libfdisk12.34-0.1ubuntu9.3
|
||||||
|
libffi73.3-4
|
||||||
|
libfido2-11.3.1-1ubuntu2
|
||||||
|
libgcc-s110.3.0-1ubuntu1~20.04
|
||||||
|
libgcrypt201.8.5-5ubuntu1.1
|
||||||
|
libgdbm61.18.1-5
|
||||||
|
libgdbm-compat41.18.1-5
|
||||||
|
libgmp102:6.2.0+dfsg-4
|
||||||
|
libgnutls303.6.13-2ubuntu1.6
|
||||||
|
libgpg-error01.37-1
|
||||||
|
libgssapi3-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libgssapi-krb5-21.17-6ubuntu4.1
|
||||||
|
libhcrypto4-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libheimbase1-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libheimntlm0-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libhogweed53.5.1+really3.5.1-2ubuntu0.2
|
||||||
|
libhx509-5-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libidn2-02.2.0-2
|
||||||
|
libjq11.6-1ubuntu0.20.04.1
|
||||||
|
libk5crypto31.17-6ubuntu4.1
|
||||||
|
libkeyutils11.6-6ubuntu1.1
|
||||||
|
libkrb5-26-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libkrb5-31.17-6ubuntu4.1
|
||||||
|
libkrb5support01.17-6ubuntu4.1
|
||||||
|
libksba81.3.5-2
|
||||||
|
libldap-2.4-22.4.49+dfsg-2ubuntu1.9
|
||||||
|
libldap-common2.4.49+dfsg-2ubuntu1.9
|
||||||
|
liblz4-11.9.2-2ubuntu0.20.04.1
|
||||||
|
liblzma55.2.4-1ubuntu1
|
||||||
|
libmount12.34-0.1ubuntu9.3
|
||||||
|
libncurses66.2-0ubuntu2
|
||||||
|
libncursesw66.2-0ubuntu2
|
||||||
|
libnettle73.5.1+really3.5.1-2ubuntu0.2
|
||||||
|
libnghttp2-141.40.0-1build1
|
||||||
|
libnpth01.6-1
|
||||||
|
libonig56.9.4-1
|
||||||
|
libp11-kit00.23.20-1ubuntu0.1
|
||||||
|
libpam0g1.3.1-5ubuntu4.3
|
||||||
|
libpam-modules1.3.1-5ubuntu4.3
|
||||||
|
libpam-modules-bin1.3.1-5ubuntu4.3
|
||||||
|
libpam-runtime1.3.1-5ubuntu4.3
|
||||||
|
libpcre2-8-010.34-7
|
||||||
|
libpcre32:8.39-12build1
|
||||||
|
libperl5.305.30.0-9ubuntu0.2
|
||||||
|
libprocps82:3.3.16-1ubuntu2.3
|
||||||
|
libpsl50.21.0-1ubuntu1
|
||||||
|
libreadline88.0-4
|
||||||
|
libroken18-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
librtmp12.4+20151223.gitfa8646d.1-2build1
|
||||||
|
libsasl2-22.1.27+dfsg-2ubuntu0.1
|
||||||
|
libsasl2-modules2.1.27+dfsg-2ubuntu0.1
|
||||||
|
libsasl2-modules-db2.1.27+dfsg-2ubuntu0.1
|
||||||
|
libseccomp22.5.1-1ubuntu1~20.04.2
|
||||||
|
libselinux13.0-1build2
|
||||||
|
libsemanage13.0-1build2
|
||||||
|
libsemanage-common3.0-1build2
|
||||||
|
libsepol13.0-1
|
||||||
|
libsmartcols12.34-0.1ubuntu9.3
|
||||||
|
libsqlite3-03.31.1-4ubuntu0.3
|
||||||
|
libss21.45.5-2ubuntu1
|
||||||
|
libssh-40.9.3-2ubuntu2.2
|
||||||
|
libssl1.11.1.1f-1ubuntu2.16
|
||||||
|
libstdc++610.3.0-1ubuntu1~20.04
|
||||||
|
libsystemd0245.4-4ubuntu3.15
|
||||||
|
libtasn1-64.16.0-2
|
||||||
|
libtinfo66.2-0ubuntu2
|
||||||
|
libudev1245.4-4ubuntu3.15
|
||||||
|
libunistring20.9.10-2
|
||||||
|
libuuid12.34-0.1ubuntu9.3
|
||||||
|
libwind0-heimdal7.7.0+dfsg-1ubuntu1
|
||||||
|
libx11-62:1.6.9-2ubuntu1.2
|
||||||
|
libx11-data2:1.6.9-2ubuntu1.2
|
||||||
|
libxau61:1.0.9-0ubuntu1
|
||||||
|
libxcb11.14-2
|
||||||
|
libxdmcp61:1.1.3-0ubuntu1
|
||||||
|
libxext62:1.3.4-0ubuntu1
|
||||||
|
libxmuu12:1.1.3-0ubuntu1
|
||||||
|
libzstd11.4.4+dfsg-3ubuntu0.1
|
||||||
|
locales2.31-0ubuntu9.9
|
||||||
|
login1:4.8.1-1ubuntu5.20.04.1
|
||||||
|
logsave1.45.5-2ubuntu1
|
||||||
|
lsb-base11.1.0ubuntu2
|
||||||
|
mawk1.3.4.20200120-2
|
||||||
|
mount2.34-0.1ubuntu9.3
|
||||||
|
nano4.8-1ubuntu1
|
||||||
|
ncurses-base6.2-0ubuntu2
|
||||||
|
ncurses-bin6.2-0ubuntu2
|
||||||
|
netbase6.1
|
||||||
|
net-tools1.60+git20180626.aebd88e-1ubuntu1
|
||||||
|
openssh-client1:8.2p1-4ubuntu0.5
|
||||||
|
openssl1.1.1f-1ubuntu2.16
|
||||||
|
passwd1:4.8.1-1ubuntu5.20.04.1
|
||||||
|
patch2.7.6-6
|
||||||
|
perl5.30.0-9ubuntu0.2
|
||||||
|
perl-base5.30.0-9ubuntu0.2
|
||||||
|
perl-modules-5.305.30.0-9ubuntu0.2
|
||||||
|
pinentry-curses1.1.0-3build1
|
||||||
|
procps2:3.3.16-1ubuntu2.3
|
||||||
|
publicsuffix20200303.0012-1
|
||||||
|
readline-common8.0-4
|
||||||
|
sed4.7-1
|
||||||
|
sensible-utils0.0.12+nmu1
|
||||||
|
sudo1.8.31-1ubuntu1.2
|
||||||
|
sysvinit-utils2.96-2.1ubuntu1
|
||||||
|
tar1.30+dfsg-7ubuntu0.20.04.2
|
||||||
|
tzdata2022a-0ubuntu0.20.04
|
||||||
|
ubuntu-keyring2020.02.11.4
|
||||||
|
util-linux2.34-0.1ubuntu9.3
|
||||||
|
xauth1:1.1-0ubuntu1
|
||||||
|
zlib1g1:1.2.11.dfsg-2ubuntu1.2
|
105
readme-vars.yml
105
readme-vars.yml
@ -2,26 +2,99 @@
|
|||||||
|
|
||||||
# project information
|
# project information
|
||||||
project_name: code-server
|
project_name: code-server
|
||||||
full_custom_readme: |
|
project_url: "https://coder.com"
|
||||||
{% raw -%}
|
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/code-server-banner.png"
|
||||||
[linuxserverurl]: https://linuxserver.io
|
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is VS Code running on a remote server, accessible through the browser.
|
||||||
[forumurl]: https://forum.linuxserver.io
|
|
||||||
|
|
||||||
[][linuxserverurl]
|
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
|
||||||
|
|
||||||
## Contact information:-
|
- If you have a Windows or Mac workstation, more easily develop for Linux.
|
||||||
|
|
||||||
| Type | Address/Details |
|
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
|
||||||
| :---: | --- |
|
|
||||||
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
|
||||||
| Forum | [Linuserver.io forum][forumurl] |
|
|
||||||
|
|
||||||
|
- Preserve battery life when you're on the go.
|
||||||
|
|
||||||
|
|
||||||
The code in this branch is not meant for direct consumption. It is a modification layer to add python2 into `linuxserver/code-server`
|
- All intensive computation runs on your server.
|
||||||
|
|
||||||
The following line is only in this repo for release messaging:
|
- You're no longer running excess instances of Chrome."
|
||||||
|
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||||
|
|
||||||
- { date: "01.01.50:", desc: "I am the release message for this custom branch" }
|
# supported architectures
|
||||||
{%- endraw %}
|
available_architectures:
|
||||||
|
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||||
|
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||||
|
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
|
||||||
|
|
||||||
|
# development version
|
||||||
|
development_versions: true
|
||||||
|
development_versions_items:
|
||||||
|
- { tag: "latest", desc: "Stable releases" }
|
||||||
|
- { tag: "focal", desc: "DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal" }
|
||||||
|
- { tag: "development", desc: "DEPRECATED (no longer updated) - Prereleases from their GitHub" }
|
||||||
|
|
||||||
|
# container parameters
|
||||||
|
common_param_env_vars_enabled: true
|
||||||
|
param_container_name: "{{ project_name }}"
|
||||||
|
param_usage_include_vols: true
|
||||||
|
param_volumes:
|
||||||
|
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files." }
|
||||||
|
param_usage_include_ports: true
|
||||||
|
param_ports:
|
||||||
|
- { 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
|
||||||
|
opt_param_usage_include_env: true
|
||||||
|
opt_param_env_vars:
|
||||||
|
- { 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: "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/docs/FAQ.md#sub-domains)" }
|
||||||
|
- { 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
|
||||||
|
optional_block_1_items: ""
|
||||||
|
|
||||||
|
# application setup block
|
||||||
|
app_setup_block_enabled: true
|
||||||
|
app_setup_block: |
|
||||||
|
Access the webui at `http://<your-ip>:8443`.
|
||||||
|
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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git config --global user.name "username"
|
||||||
|
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
|
||||||
|
changelogs:
|
||||||
|
- { date: "20.02.22:", desc: "Install using the official tarballs." }
|
||||||
|
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
|
||||||
|
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
|
||||||
|
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
|
||||||
|
- { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }
|
||||||
|
- { date: "11.07.21:", desc: "Bump node to 14 to fix builds" }
|
||||||
|
- { date: "08.05.21:", desc: "Fix doc link" }
|
||||||
|
- { 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: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
|
||||||
|
- { date: "29.04.20:", desc: "Update start arguments." }
|
||||||
|
- { date: "01.04.20:", desc: "Structural changes required for v3." }
|
||||||
|
- { date: "17.01.20:", desc: "Fix artifact url retrieval from github." }
|
||||||
|
- { date: "24.10.19:", desc: "Upgrade to v2 builds." }
|
||||||
|
- { date: "28.09.19:", desc: "Update project logo." }
|
||||||
|
- { date: "21.09.19:", desc: "Add development builds/tag." }
|
||||||
|
- { date: "09.07.19:", desc: "Add optional sudo access." }
|
||||||
|
- { date: "01.07.19:", desc: "Add nano." }
|
||||||
|
- { date: "24.06.19:", desc: "Initial Release." }
|
||||||
|
42
root/etc/cont-init.d/30-config
Normal file
42
root/etc/cont-init.d/30-config
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
mkdir -p /config/{extensions,data,workspace,.ssh}
|
||||||
|
|
||||||
|
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||||
|
echo "setting up sudo access"
|
||||||
|
if ! grep -q 'abc' /etc/sudoers; then
|
||||||
|
echo "adding abc to sudoers"
|
||||||
|
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||||
|
fi
|
||||||
|
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||||
|
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
|
||||||
|
|
||||||
|
[[ ! -f /config/.bashrc ]] && \
|
||||||
|
cp /root/.bashrc /config/.bashrc
|
||||||
|
[[ ! -f /config/.profile ]] && \
|
||||||
|
cp /root/.profile /config/.profile
|
||||||
|
|
||||||
|
# permissions
|
||||||
|
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
|
||||||
|
CORES=$(nproc --all)
|
||||||
|
|
||||||
|
# Split workload between config and workspace
|
||||||
|
echo "setting permissions::configuration"
|
||||||
|
find /config -path /config/workspace -prune -false -o -type d -print0 | \
|
||||||
|
xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
|
||||||
|
chown -R abc:abc
|
||||||
|
|
||||||
|
echo "setting permissions::workspace"
|
||||||
|
chown abc:abc /config/workspace
|
||||||
|
else
|
||||||
|
# Set permissions on data mount
|
||||||
|
# do not decend into the workspace
|
||||||
|
chown -R abc:abc "$(ls /config -I workspace)"
|
||||||
|
chown abc:abc /config/workspace
|
||||||
|
fi
|
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
echo "**** installing python2 and pip ****"
|
|
||||||
apt-get update && apt-get install -y \
|
|
||||||
python \
|
|
||||||
python-pip
|
|
25
root/etc/services.d/code-server/run
Normal file
25
root/etc/services.d/code-server/run
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
|
||||||
|
AUTH="password"
|
||||||
|
else
|
||||||
|
AUTH="none"
|
||||||
|
echo "starting with no password"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z ${PROXY_DOMAIN+x} ]; then
|
||||||
|
PROXY_DOMAIN_ARG=""
|
||||||
|
else
|
||||||
|
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec \
|
||||||
|
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}" \
|
||||||
|
"${PROXY_DOMAIN_ARG}" \
|
||||||
|
"${DEFAULT_WORKSPACE:-/config/workspace}"
|
10
root/usr/local/bin/install-extension
Executable file
10
root/usr/local/bin/install-extension
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
_install=(/app/code-server/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
|
||||||
|
|
||||||
|
if [ "$(whoami)" == "abc" ]; then
|
||||||
|
"${_install[@]}" "$@"
|
||||||
|
else
|
||||||
|
s6-setuidgid abc "${_install[@]}" "$@"
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user