Skip to content

Commit 5e14620

Browse files
Bot Updating Templated Files
1 parent d09295c commit 5e14620

File tree

4 files changed

+84
-42
lines changed

4 files changed

+84
-42
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[linuxserverurl]: https://linuxserver.io
22
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
33

4-
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.
4+
<!--- 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. --->
5+
6+
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
7+
<!--- 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/ -->
58

69
<!--- Provide a general summary of the issue in the Title above -->
710

@@ -22,9 +25,10 @@ If you are new to Docker or this application our issue tracker is **ONLY** used
2225
4.
2326

2427
## Environment
25-
**OS:**
26-
**CPU architecture:** x86_64/arm32/arm64
27-
**How docker service was installed:**
28+
**OS:**
29+
**CPU architecture:** x86_64/arm32/arm64
30+
**How docker service was installed:**
31+
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
2832
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
2933

3034
## Command used to create docker container (run/create/compose/screenshot)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[linuxserverurl]: https://linuxserver.io
44
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
5-
5+
66

77
<!--- Before submitting a pull request please check the following -->
88

9-
<!--- 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 -->
9+
<!--- 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 -->
1010
<!--- 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/ -->
1111
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
1212
<!--- 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 @@
2121

2222
------------------------------
2323

24-
We welcome all PR’s though this doesn’t guarantee it will be accepted.
24+
- [ ] 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
25+
26+
------------------------------
27+
28+
<!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. -->
2529

2630
## Description:
2731
<!--- Describe your changes in detail -->

Jenkinsfile

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pipeline {
5757
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
5858
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
5959
env.PULL_REQUEST = env.CHANGE_ID
60-
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md'
60+
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml'
6161
}
6262
script{
6363
env.LS_RELEASE_NUMBER = sh(
@@ -138,6 +138,7 @@ pipeline {
138138
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
139139
}
140140
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
141+
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
141142
}
142143
}
143144
}
@@ -158,6 +159,7 @@ pipeline {
158159
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
159160
}
160161
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
162+
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
161163
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
162164
}
163165
}
@@ -178,6 +180,7 @@ pipeline {
178180
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
179181
}
180182
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
183+
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
181184
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
182185
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
183186
}
@@ -236,7 +239,7 @@ pipeline {
236239
cd ${TEMPDIR}/repo/${LS_REPO}
237240
git checkout -f development
238241
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
239-
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
242+
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
240243
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
241244
cd ${TEMPDIR}/repo/${LS_REPO}/
242245
git add ${TEMPLATED_FILES}
@@ -545,15 +548,18 @@ pipeline {
545548
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
546549
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
547550
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:development
551+
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
548552
docker push ${PUSHIMAGE}:development
549553
docker push ${PUSHIMAGE}:${META_TAG}
554+
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
550555
done
551556
'''
552557
}
553558
sh '''#! /bin/bash
554559
for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
555560
docker rmi \
556561
${DELETEIMAGE}:${META_TAG} \
562+
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
557563
${DELETEIMAGE}:development || :
558564
done
559565
'''
@@ -594,12 +600,18 @@ pipeline {
594600
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-development
595601
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-development
596602
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-development
603+
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
604+
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
605+
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
597606
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
598607
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
599608
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
600609
docker push ${MANIFESTIMAGE}:amd64-development
601610
docker push ${MANIFESTIMAGE}:arm32v7-development
602611
docker push ${MANIFESTIMAGE}:arm64v8-development
612+
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
613+
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
614+
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
603615
docker manifest push --purge ${MANIFESTIMAGE}:development || :
604616
docker manifest create ${MANIFESTIMAGE}:development ${MANIFESTIMAGE}:amd64-development ${MANIFESTIMAGE}:arm32v7-development ${MANIFESTIMAGE}:arm64v8-development
605617
docker manifest annotate ${MANIFESTIMAGE}:development ${MANIFESTIMAGE}:arm32v7-development --os linux --arch arm
@@ -608,8 +620,12 @@ pipeline {
608620
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
609621
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
610622
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
623+
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
624+
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
625+
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
611626
docker manifest push --purge ${MANIFESTIMAGE}:development
612627
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
628+
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
613629
done
614630
docker tag ${IMAGE}:amd64-${META_TAG} ${GITHUBIMAGE}:amd64-${META_TAG}
615631
docker tag ${IMAGE}:arm32v7-${META_TAG} ${GITHUBIMAGE}:arm32v7-${META_TAG}
@@ -618,13 +634,21 @@ pipeline {
618634
docker tag ${GITHUBIMAGE}:amd64-${META_TAG} ${GITHUBIMAGE}:${META_TAG}
619635
docker tag ${GITHUBIMAGE}:arm32v7-${META_TAG} ${GITHUBIMAGE}:arm32v7-development
620636
docker tag ${GITHUBIMAGE}:arm64v8-${META_TAG} ${GITHUBIMAGE}:arm64v8-development
637+
docker tag ${GITHUBIMAGE}:amd64-${META_TAG} ${GITHUBIMAGE}:amd64-${EXT_RELEASE_TAG}
638+
docker tag ${GITHUBIMAGE}:amd64-${META_TAG} ${GITHUBIMAGE}:${EXT_RELEASE_TAG}
639+
docker tag ${GITHUBIMAGE}:arm32v7-${META_TAG} ${GITHUBIMAGE}:arm32v7-${EXT_RELEASE_TAG}
640+
docker tag ${GITHUBIMAGE}:arm64v8-${META_TAG} ${GITHUBIMAGE}:arm64v8-${EXT_RELEASE_TAG}
621641
docker push ${GITHUBIMAGE}:amd64-${META_TAG}
622642
docker push ${GITHUBIMAGE}:arm32v7-${META_TAG}
623643
docker push ${GITHUBIMAGE}:arm64v8-${META_TAG}
624644
docker push ${GITHUBIMAGE}:development
625645
docker push ${GITHUBIMAGE}:${META_TAG}
626646
docker push ${GITHUBIMAGE}:arm32v7-development
627647
docker push ${GITHUBIMAGE}:arm64v8-development
648+
docker push ${GITHUBIMAGE}:${EXT_RELEASE_TAG}
649+
docker push ${GITHUBIMAGE}:amd64-${EXT_RELEASE_TAG}
650+
docker push ${GITHUBIMAGE}:arm32v7-${EXT_RELEASE_TAG}
651+
docker push ${GITHUBIMAGE}:arm64v8-${EXT_RELEASE_TAG}
628652
'''
629653
}
630654
sh '''#! /bin/bash
@@ -690,14 +714,20 @@ pipeline {
690714
]
691715
]) {
692716
sh '''#! /bin/bash
717+
set -e
718+
TEMPDIR=$(mktemp -d)
719+
docker pull linuxserver/jenkins-builder:latest
720+
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
693721
docker pull lsiodev/readme-sync
694722
docker run --rm=true \
695723
-e DOCKERHUB_USERNAME=$DOCKERUSER \
696724
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
697725
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
698726
-e DOCKER_REPOSITORY=${IMAGE} \
699727
-e GIT_BRANCH=master \
700-
lsiodev/readme-sync bash -c 'node sync' '''
728+
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
729+
lsiodev/readme-sync bash -c 'node sync'
730+
rm -Rf ${TEMPDIR} '''
701731
}
702732
}
703733
}

README.md

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- DO NOT EDIT THIS FILE MANUALLY -->
2+
<!-- Please read the CONTRIBUTING.md -->
3+
14
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
25

36
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
@@ -70,28 +73,11 @@ This image provides various versions that are available via tags. `latest` tag u
7073

7174
Here are some example snippets to help you get started creating a container.
7275

73-
### docker
74-
75-
```
76-
docker create \
77-
--name=code-server \
78-
-e PUID=1000 \
79-
-e PGID=1000 \
80-
-e TZ=Europe/London \
81-
-e PASSWORD=password `#optional` \
82-
-e SUDO_PASSWORD=password `#optional` \
83-
-p 8443:8443 \
84-
-v /path/to/appdata/config:/config \
85-
--restart unless-stopped \
86-
linuxserver/code-server
87-
```
88-
89-
90-
### docker-compose
76+
### docker-compose ([recommended](https://docs.linuxserver.io/general/docker-compose))
9177

9278
Compatible with docker-compose v2 schemas.
9379

94-
```
80+
```yaml
9581
---
9682
version: "2.1"
9783
services:
@@ -111,6 +97,23 @@ services:
11197
restart: unless-stopped
11298
```
11399
100+
### docker cli
101+
102+
```
103+
docker run -d \
104+
--name=code-server \
105+
-e PUID=1000 \
106+
-e PGID=1000 \
107+
-e TZ=Europe/London \
108+
-e PASSWORD=password `#optional` \
109+
-e SUDO_PASSWORD=password `#optional` \
110+
-p 8443:8443 \
111+
-v /path/to/appdata/config:/config \
112+
--restart unless-stopped \
113+
linuxserver/code-server
114+
```
115+
116+
114117
## Parameters
115118

116119
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.
@@ -169,9 +172,9 @@ git config --global user.email "email address"
169172

170173

171174
## Docker Mods
172-
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=mods&query=%24.mods%5B%27code-server%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=code-server "view available mods for this container.")
175+
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=code-server&query=%24.mods%5B%27code-server%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=code-server "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
173176

174-
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) can be accessed via the dynamic badge above.
177+
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.
175178

176179

177180
## Support Info
@@ -189,33 +192,34 @@ Most of our images are static, versioned, and require an image update and contai
189192

190193
Below are the instructions for updating containers:
191194

192-
### Via Docker Run/Create
193-
* Update the image: `docker pull linuxserver/code-server`
194-
* Stop the running container: `docker stop code-server`
195-
* Delete the container: `docker rm code-server`
196-
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
197-
* Start the new container: `docker start code-server`
198-
* You can also remove the old dangling images: `docker image prune`
199-
200195
### Via Docker Compose
201196
* Update all images: `docker-compose pull`
202197
* or update a single image: `docker-compose pull code-server`
203198
* Let compose update all containers as necessary: `docker-compose up -d`
204199
* or update a single container: `docker-compose up -d code-server`
205200
* You can also remove the old dangling images: `docker image prune`
206201

207-
### Via Watchtower auto-updater (especially useful if you don't remember the original parameters)
202+
### Via Docker Run
203+
* Update the image: `docker pull linuxserver/code-server`
204+
* Stop the running container: `docker stop code-server`
205+
* Delete the container: `docker rm code-server`
206+
* 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)
207+
* You can also remove the old dangling images: `docker image prune`
208+
209+
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
208210
* Pull the latest image at its tag and replace it with the same env variables in one run:
209211
```
210212
docker run --rm \
211213
-v /var/run/docker.sock:/var/run/docker.sock \
212214
containrrr/watchtower \
213215
--run-once code-server
214216
```
217+
* You can also remove the old dangling images: `docker image prune`
215218

216-
**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.
219+
**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).
217220

218-
* You can also remove the old dangling images: `docker image prune`
221+
### Image Update Notifications - Diun (Docker Image Update Notifier)
222+
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
219223

220224
## Building locally
221225

0 commit comments

Comments
 (0)