Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
82c9fa140c | ||
|
6e55e420ba | ||
|
2e4bca6e45 |
36
Dockerfile
36
Dockerfile
@ -1,44 +1,10 @@
|
|||||||
FROM lsiobase/ubuntu:bionic
|
FROM scratch
|
||||||
|
|
||||||
# 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 \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
nano \
|
|
||||||
net-tools \
|
|
||||||
sudo && \
|
|
||||||
echo "**** install code-server ****" && \
|
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
|
||||||
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
|
||||||
fi && \
|
|
||||||
CODE_URL=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/tags/${CODE_RELEASE}" \
|
|
||||||
| jq -r '.assets[] | select(.browser_download_url | contains("linux-x86_64")) | .browser_download_url') && \
|
|
||||||
curl -o \
|
|
||||||
/tmp/code.tar.gz -L \
|
|
||||||
"${CODE_URL}" && \
|
|
||||||
tar xzf /tmp/code.tar.gz -C \
|
|
||||||
/usr/bin/ --strip-components=1 \
|
|
||||||
--wildcards code-server*/code-server && \
|
|
||||||
echo "**** clean up ****" && \
|
|
||||||
rm -rf \
|
|
||||||
/tmp/* \
|
|
||||||
/var/lib/apt/lists/* \
|
|
||||||
/var/tmp/*
|
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
|
||||||
# ports and volumes
|
|
||||||
EXPOSE 8443
|
|
||||||
|
186
Jenkinsfile
vendored
186
Jenkinsfile
vendored
@ -16,9 +16,6 @@ pipeline {
|
|||||||
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||||
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||||
EXT_GIT_BRANCH = 'master'
|
|
||||||
EXT_USER = 'cdr'
|
|
||||||
EXT_REPO = 'code-server'
|
|
||||||
CONTAINER_NAME = 'code-server'
|
CONTAINER_NAME = 'code-server'
|
||||||
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
@ -28,14 +25,7 @@ pipeline {
|
|||||||
PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||||
DIST_IMAGE = 'ubuntu'
|
DIST_IMAGE = 'ubuntu'
|
||||||
MULTIARCH='false'
|
MULTIARCH='false'
|
||||||
CI='true'
|
CI='false'
|
||||||
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
|
||||||
@ -44,7 +34,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}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
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' || : ''',
|
||||||
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' ''',
|
||||||
@ -101,21 +91,12 @@ pipeline {
|
|||||||
/* ########################
|
/* ########################
|
||||||
External Release Tagging
|
External Release Tagging
|
||||||
######################## */
|
######################## */
|
||||||
// If this is a stable github release use the latest endpoint from github to determine the ext tag
|
// If this is an os release set release type to none to indicate no external release
|
||||||
stage("Set ENV github_stable"){
|
stage("Set ENV os"){
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = env.PACKAGE_TAG
|
||||||
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
|
env.RELEASE_LINK = 'none'
|
||||||
returnStdout: true).trim()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If this is a stable or devel github release generate the link for the build message
|
|
||||||
stage("Set ENV github_link"){
|
|
||||||
steps{
|
|
||||||
script{
|
|
||||||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -129,10 +110,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a master build use live docker endpoints
|
// If this is a mod-python2 build use live docker endpoints
|
||||||
stage("Set ENV live build"){
|
stage("Set ENV live build"){
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "mod-python2"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -153,7 +134,7 @@ pipeline {
|
|||||||
// 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 "master"}
|
not {branch "mod-python2"}
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -226,7 +207,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 "master"
|
branch "mod-python2"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
expression {
|
expression {
|
||||||
env.CONTAINER_NAME != null
|
env.CONTAINER_NAME != null
|
||||||
@ -237,7 +218,7 @@ pipeline {
|
|||||||
set -e
|
set -e
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull linuxserver/jenkins-builder:latest
|
docker pull linuxserver/jenkins-builder:latest
|
||||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins 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
|
||||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
@ -245,7 +226,7 @@ pipeline {
|
|||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f mod-python2
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
|
||||||
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
|
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
@ -277,7 +258,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 "master"
|
branch "mod-python2"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'FILES_UPDATED', value: 'true'
|
environment name: 'FILES_UPDATED', value: 'true'
|
||||||
expression {
|
expression {
|
||||||
@ -393,89 +374,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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" ]; 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'
|
|
||||||
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 {
|
|
||||||
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 {
|
|
||||||
script{
|
|
||||||
env.EXIT_STATUS = 'ABORTED'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* #######
|
/* #######
|
||||||
Testing
|
Testing
|
||||||
####### */
|
####### */
|
||||||
@ -557,14 +455,14 @@ pipeline {
|
|||||||
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
|
for PUSHIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
||||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:mod-python2
|
||||||
docker push ${PUSHIMAGE}:latest
|
docker push ${PUSHIMAGE}:mod-python2
|
||||||
docker push ${PUSHIMAGE}:${META_TAG}
|
docker push ${PUSHIMAGE}:${META_TAG}
|
||||||
done
|
done
|
||||||
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
|
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:${META_TAG} \
|
${DELETEIMAGE}:${META_TAG} \
|
||||||
${DELETEIMAGE}:latest || :
|
${DELETEIMAGE}:mod-python2 || :
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@ -607,52 +505,52 @@ pipeline {
|
|||||||
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-latest
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-mod-python2
|
||||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-mod-python2
|
||||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||||
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-latest
|
docker push ${MANIFESTIMAGE}:amd64-mod-python2
|
||||||
docker push ${MANIFESTIMAGE}:arm32v7-latest
|
docker push ${MANIFESTIMAGE}:arm32v7-mod-python2
|
||||||
docker push ${MANIFESTIMAGE}:arm64v8-latest
|
docker push ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
docker manifest push --purge ${MANIFESTIMAGE}:mod-python2 || :
|
||||||
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
docker manifest create ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:amd64-mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 --os linux --arch arm
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
|
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2 --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}:latest
|
docker manifest push --purge ${MANIFESTIMAGE}:mod-python2
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||||
done
|
done
|
||||||
for LEGACYIMAGE in "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
for LEGACYIMAGE in "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||||
docker tag ${IMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:amd64-${META_TAG}
|
docker tag ${IMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:amd64-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
docker tag ${IMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
docker tag ${IMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
||||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:latest
|
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:mod-python2
|
||||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:${META_TAG}
|
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:${META_TAG}
|
||||||
docker tag ${LEGACYIMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-latest
|
docker tag ${LEGACYIMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-mod-python2
|
||||||
docker tag ${LEGACYIMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-latest
|
docker tag ${LEGACYIMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-mod-python2
|
||||||
docker push ${LEGACYIMAGE}:amd64-${META_TAG}
|
docker push ${LEGACYIMAGE}:amd64-${META_TAG}
|
||||||
docker push ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
docker push ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
||||||
docker push ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
docker push ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
||||||
docker push ${LEGACYIMAGE}:latest
|
docker push ${LEGACYIMAGE}:mod-python2
|
||||||
docker push ${LEGACYIMAGE}:${META_TAG}
|
docker push ${LEGACYIMAGE}:${META_TAG}
|
||||||
docker push ${LEGACYIMAGE}:arm32v7-latest
|
docker push ${LEGACYIMAGE}:arm32v7-mod-python2
|
||||||
docker push ${LEGACYIMAGE}:arm64v8-latest
|
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 "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||||
${DELETEIMAGE}:amd64-latest \
|
${DELETEIMAGE}:amd64-mod-python2 \
|
||||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-latest \
|
${DELETEIMAGE}:arm32v7-mod-python2 \
|
||||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-latest || :
|
${DELETEIMAGE}:arm64v8-mod-python2 || :
|
||||||
done
|
done
|
||||||
docker rmi \
|
docker rmi \
|
||||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||||
@ -664,7 +562,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 "master"
|
branch "mod-python2"
|
||||||
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
|
||||||
}
|
}
|
||||||
@ -676,17 +574,17 @@ pipeline {
|
|||||||
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":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||||
"object": "'${COMMIT_SHA}'",\
|
"object": "'${COMMIT_SHA}'",\
|
||||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to mod-python2",\
|
||||||
"type": "commit",\
|
"type": "commit",\
|
||||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
echo "Pushing New release for Tag"
|
echo "Pushing New release for Tag"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||||
"target_commitish": "master",\
|
"target_commitish": "mod-python2",\
|
||||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
|
||||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
printf '","draft": false,"prerelease": true}' >> 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'''
|
||||||
}
|
}
|
||||||
|
242
README.md
242
README.md
@ -1,238 +1,20 @@
|
|||||||
[](https://linuxserver.io)
|
[linuxserverurl]: https://linuxserver.io
|
||||||
|
[forumurl]: https://forum.linuxserver.io
|
||||||
|
|
||||||
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
[][linuxserverurl]
|
||||||
[](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")
|
|
||||||
|
|
||||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :-
|
## Contact information:-
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
Find us at:
|
|
||||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
|
||||||
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
|
|
||||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
|
||||||
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
|
|
||||||
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
|
||||||
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
|
||||||
|
|
||||||
# [linuxserver/code-server](https://github.com/linuxserver/docker-code-server)
|
|
||||||
|
|
||||||
[](https://github.com/linuxserver/docker-code-server)
|
|
||||||
[](https://github.com/linuxserver/docker-code-server/releases)
|
|
||||||
[](https://github.com/linuxserver/docker-code-server/packages)
|
|
||||||
[](https://gitlab.com/Linuxserver.io/docker-code-server/container_registry)
|
|
||||||
[](https://quay.io/repository/linuxserver.io/code-server)
|
|
||||||
[](https://microbadger.com/images/linuxserver/code-server "Get your own version badge on microbadger.com")
|
|
||||||
[](https://hub.docker.com/r/linuxserver/code-server)
|
|
||||||
[](https://hub.docker.com/r/linuxserver/code-server)
|
|
||||||
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/)
|
|
||||||
[](https://lsio-ci.ams3.digitaloceanspaces.com/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
|
|
||||||
|
|
||||||
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. 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 `linuxserver/code-server` 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 | Tag |
|
|
||||||
| :----: | --- |
|
|
||||||
| x86-64 | amd64-latest |
|
|
||||||
|
|
||||||
## Version Tags
|
|
||||||
|
|
||||||
This image provides various versions that are available via tags. `latest` tag usually provides the latest stable version. Others are considered under development and caution must be exercised when using them.
|
|
||||||
|
|
||||||
| Tag | Description |
|
|
||||||
| :----: | --- |
|
|
||||||
| latest | Stable releases |
|
|
||||||
| development | Prereleases from their GitHub |
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Here are some example snippets to help you get started creating a container.
|
|
||||||
|
|
||||||
### docker
|
|
||||||
|
|
||||||
```
|
|
||||||
docker create \
|
|
||||||
--name=code-server \
|
|
||||||
-e PUID=1000 \
|
|
||||||
-e PGID=1000 \
|
|
||||||
-e TZ=Europe/London \
|
|
||||||
-e PASSWORD=password `#optional` \
|
|
||||||
-e SUDO_PASSWORD=password `#optional` \
|
|
||||||
-p 8443:8443 \
|
|
||||||
-v /path/to/appdata/config:/config \
|
|
||||||
--restart unless-stopped \
|
|
||||||
linuxserver/code-server
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### docker-compose
|
|
||||||
|
|
||||||
Compatible with docker-compose v2 schemas.
|
|
||||||
|
|
||||||
```
|
|
||||||
---
|
|
||||||
version: "2"
|
|
||||||
services:
|
|
||||||
code-server:
|
|
||||||
image: linuxserver/code-server
|
|
||||||
container_name: code-server
|
|
||||||
environment:
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
- TZ=Europe/London
|
|
||||||
- PASSWORD=password #optional
|
|
||||||
- SUDO_PASSWORD=password #optional
|
|
||||||
volumes:
|
|
||||||
- /path/to/appdata/config:/config
|
|
||||||
ports:
|
|
||||||
- 8443:8443
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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 not provided, there will be no auth. |
|
|
||||||
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
|
|
||||||
| `-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:
|
|
||||||
|
|
||||||
```
|
|
||||||
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
|
||||||
```
|
|
||||||
|
|
||||||
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ id username
|
|
||||||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
| Type | Address/Details |
|
||||||
|
| :---: | --- |
|
||||||
|
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
||||||
|
| Forum | [Linuserver.io forum][forumurl] |
|
||||||
|
|
||||||
|
|
||||||
## Application Setup
|
|
||||||
|
|
||||||
Access the webui at `http://<your-ip>:8443`.
|
The code in this branch is not meant for direct consumption. It is a modification layer to add python2 into `linuxserver/code-server`
|
||||||
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
|
|
||||||
```
|
|
||||||
git config --global user.name "username"
|
|
||||||
git config --global user.email "email address"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
The following line is only in this repo for release messaging:
|
||||||
|
|
||||||
|
- { date: "01.01.50:", desc: "I am the release message for this custom branch" }
|
||||||
## 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" }}' linuxserver/code-server`
|
|
||||||
|
|
||||||
## 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 Run/Create
|
|
||||||
* Update the image: `docker pull linuxserver/code-server`
|
|
||||||
* Stop the running container: `docker stop code-server`
|
|
||||||
* Delete the container: `docker rm code-server`
|
|
||||||
* 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)
|
|
||||||
* Start the new container: `docker start code-server`
|
|
||||||
* You can also remove the old dangling images: `docker image prune`
|
|
||||||
|
|
||||||
### 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 Watchtower auto-updater (especially useful 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:
|
|
||||||
```
|
|
||||||
docker run --rm \
|
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
||||||
containrrr/watchtower \
|
|
||||||
--run-once code-server
|
|
||||||
```
|
|
||||||
|
|
||||||
**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.
|
|
||||||
|
|
||||||
* You can also remove the old dangling images: `docker image prune`
|
|
||||||
|
|
||||||
## Building locally
|
|
||||||
|
|
||||||
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
|
||||||
```
|
|
||||||
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`
|
|
||||||
```
|
|
||||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
||||||
```
|
|
||||||
|
|
||||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
|
||||||
|
|
||||||
## Versions
|
|
||||||
|
|
||||||
* **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,14 +2,12 @@
|
|||||||
|
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-code-server
|
project_name: docker-code-server
|
||||||
external_type: github_stable
|
external_type: os
|
||||||
release_type: stable
|
release_type: prerelease
|
||||||
release_tag: latest
|
release_tag: mod-python2
|
||||||
ls_branch: master
|
ls_branch: mod-python2
|
||||||
|
skip_package_check: true
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- EXT_GIT_BRANCH = 'master'
|
|
||||||
- EXT_USER = 'cdr'
|
|
||||||
- EXT_REPO = 'code-server'
|
|
||||||
- CONTAINER_NAME = 'code-server'
|
- CONTAINER_NAME = 'code-server'
|
||||||
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
- LS_USER = 'linuxserver'
|
- LS_USER = 'linuxserver'
|
||||||
@ -19,11 +17,4 @@ repo_vars:
|
|||||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
- PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||||
- DIST_IMAGE = 'ubuntu'
|
- DIST_IMAGE = 'ubuntu'
|
||||||
- MULTIARCH='false'
|
- MULTIARCH='false'
|
||||||
- CI='true'
|
- CI='false'
|
||||||
- CI_WEB='true'
|
|
||||||
- CI_PORT='8443'
|
|
||||||
- CI_SSL='false'
|
|
||||||
- CI_DELAY='120'
|
|
||||||
- CI_DOCKERENV='TZ=US/Pacific'
|
|
||||||
- CI_AUTH='user:password'
|
|
||||||
- CI_WEBPATH=''
|
|
||||||
|
@ -1,155 +0,0 @@
|
|||||||
adduser3.116ubuntu1
|
|
||||||
apt1.6.12
|
|
||||||
apt-utils1.6.12
|
|
||||||
base-files10.1ubuntu2.7
|
|
||||||
base-passwd3.5.44
|
|
||||||
bash4.4.18-2ubuntu1.2
|
|
||||||
bsdutils1:2.31.1-0.4ubuntu3.4
|
|
||||||
bzip21.0.6-8.1ubuntu0.2
|
|
||||||
ca-certificates20180409
|
|
||||||
coreutils8.28-1ubuntu1
|
|
||||||
curl7.58.0-2ubuntu3.8
|
|
||||||
dash0.5.8-2.10
|
|
||||||
debconf1.5.66ubuntu1
|
|
||||||
debianutils4.8.4
|
|
||||||
diffutils1:3.6-1
|
|
||||||
dpkg1.19.0.5ubuntu2.3
|
|
||||||
e2fsprogs1.44.1-1ubuntu1.2
|
|
||||||
fdisk2.31.1-0.4ubuntu3.4
|
|
||||||
findutils4.6.0+git+20170828-2
|
|
||||||
gcc-8-base8.3.0-6ubuntu1~18.04.1
|
|
||||||
git1:2.17.1-1ubuntu0.5
|
|
||||||
git-man1:2.17.1-1ubuntu0.5
|
|
||||||
gpgv2.2.4-1ubuntu1.2
|
|
||||||
grep3.1-2build1
|
|
||||||
gzip1.6-5ubuntu1
|
|
||||||
hostname3.20
|
|
||||||
init-system-helpers1.51
|
|
||||||
jq1.5+dfsg-2
|
|
||||||
krb5-locales1.16-2ubuntu0.1
|
|
||||||
less487-0.1
|
|
||||||
libacl12.2.52-3build1
|
|
||||||
libapt-inst2.01.6.12
|
|
||||||
libapt-pkg5.01.6.12
|
|
||||||
libasn1-8-heimdal7.5.0+dfsg-1
|
|
||||||
libattr11:2.4.47-2build1
|
|
||||||
libaudit11:2.8.2-1ubuntu1
|
|
||||||
libaudit-common1:2.8.2-1ubuntu1
|
|
||||||
libblkid12.31.1-0.4ubuntu3.4
|
|
||||||
libbsd00.8.7-1ubuntu0.1
|
|
||||||
libbz2-1.01.0.6-8.1ubuntu0.2
|
|
||||||
libc62.27-3ubuntu1
|
|
||||||
libcap-ng00.7.7-3.1
|
|
||||||
libc-bin2.27-3ubuntu1
|
|
||||||
libcom-err21.44.1-1ubuntu1.2
|
|
||||||
libcurl3-gnutls7.58.0-2ubuntu3.8
|
|
||||||
libcurl47.58.0-2ubuntu3.8
|
|
||||||
libdb5.35.3.28-13.1ubuntu1.1
|
|
||||||
libdebconfclient00.213ubuntu1
|
|
||||||
libedit23.1-20170329-1
|
|
||||||
liberror-perl0.17025-1
|
|
||||||
libexpat12.2.5-3ubuntu0.2
|
|
||||||
libext2fs21.44.1-1ubuntu1.2
|
|
||||||
libfdisk12.31.1-0.4ubuntu3.4
|
|
||||||
libffi63.2.1-8
|
|
||||||
libgcc11:8.3.0-6ubuntu1~18.04.1
|
|
||||||
libgcrypt201.8.1-4ubuntu1.2
|
|
||||||
libgdbm51.14.1-6
|
|
||||||
libgdbm-compat41.14.1-6
|
|
||||||
libgmp102:6.1.2+dfsg-2
|
|
||||||
libgnutls303.5.18-1ubuntu1.2
|
|
||||||
libgpg-error01.27-6
|
|
||||||
libgssapi3-heimdal7.5.0+dfsg-1
|
|
||||||
libgssapi-krb5-21.16-2ubuntu0.1
|
|
||||||
libhcrypto4-heimdal7.5.0+dfsg-1
|
|
||||||
libheimbase1-heimdal7.5.0+dfsg-1
|
|
||||||
libheimntlm0-heimdal7.5.0+dfsg-1
|
|
||||||
libhogweed43.4-1
|
|
||||||
libhx509-5-heimdal7.5.0+dfsg-1
|
|
||||||
libidn2-02.0.4-1.1ubuntu0.2
|
|
||||||
libjq11.5+dfsg-2
|
|
||||||
libk5crypto31.16-2ubuntu0.1
|
|
||||||
libkeyutils11.5.9-9.2ubuntu2
|
|
||||||
libkrb5-26-heimdal7.5.0+dfsg-1
|
|
||||||
libkrb5-31.16-2ubuntu0.1
|
|
||||||
libkrb5support01.16-2ubuntu0.1
|
|
||||||
libldap-2.4-22.4.45+dfsg-1ubuntu1.4
|
|
||||||
libldap-common2.4.45+dfsg-1ubuntu1.4
|
|
||||||
liblz4-10.0~r131-2ubuntu3
|
|
||||||
liblzma55.2.2-1.3
|
|
||||||
libmount12.31.1-0.4ubuntu3.4
|
|
||||||
libncurses56.1-1ubuntu1.18.04
|
|
||||||
libncursesw56.1-1ubuntu1.18.04
|
|
||||||
libnettle63.4-1
|
|
||||||
libnghttp2-141.30.0-1ubuntu1
|
|
||||||
libonig46.7.0-1
|
|
||||||
libp11-kit00.23.9-2
|
|
||||||
libpam0g1.1.8-3.6ubuntu2.18.04.1
|
|
||||||
libpam-modules1.1.8-3.6ubuntu2.18.04.1
|
|
||||||
libpam-modules-bin1.1.8-3.6ubuntu2.18.04.1
|
|
||||||
libpam-runtime1.1.8-3.6ubuntu2.18.04.1
|
|
||||||
libpcre32:8.39-9
|
|
||||||
libperl5.265.26.1-6ubuntu0.3
|
|
||||||
libprocps62:3.3.12-3ubuntu1.2
|
|
||||||
libpsl50.19.1-5build1
|
|
||||||
libroken18-heimdal7.5.0+dfsg-1
|
|
||||||
librtmp12.4+20151223.gitfa8646d.1-1
|
|
||||||
libsasl2-22.1.27~101-g0780600+dfsg-3ubuntu2
|
|
||||||
libsasl2-modules2.1.27~101-g0780600+dfsg-3ubuntu2
|
|
||||||
libsasl2-modules-db2.1.27~101-g0780600+dfsg-3ubuntu2
|
|
||||||
libseccomp22.4.1-0ubuntu0.18.04.2
|
|
||||||
libselinux12.7-2build2
|
|
||||||
libsemanage12.7-2build2
|
|
||||||
libsemanage-common2.7-2build2
|
|
||||||
libsepol12.7-1
|
|
||||||
libsmartcols12.31.1-0.4ubuntu3.4
|
|
||||||
libsqlite3-03.22.0-1ubuntu0.2
|
|
||||||
libss21.44.1-1ubuntu1.2
|
|
||||||
libssl1.0.01.0.2n-1ubuntu5.3
|
|
||||||
libssl1.11.1.1-1ubuntu2.1~18.04.5
|
|
||||||
libstdc++68.3.0-6ubuntu1~18.04.1
|
|
||||||
libsystemd0237-3ubuntu10.33
|
|
||||||
libtasn1-64.13-2
|
|
||||||
libtinfo56.1-1ubuntu1.18.04
|
|
||||||
libudev1237-3ubuntu10.33
|
|
||||||
libunistring20.9.9-0ubuntu2
|
|
||||||
libuuid12.31.1-0.4ubuntu3.4
|
|
||||||
libwind0-heimdal7.5.0+dfsg-1
|
|
||||||
libx11-62:1.6.4-3ubuntu0.2
|
|
||||||
libx11-data2:1.6.4-3ubuntu0.2
|
|
||||||
libxau61:1.0.8-1
|
|
||||||
libxcb11.13-2~ubuntu18.04
|
|
||||||
libxdmcp61:1.1.2-3
|
|
||||||
libxext62:1.3.3-1
|
|
||||||
libxmuu12:1.1.2-2
|
|
||||||
libzstd11.3.3+dfsg-2ubuntu1.1
|
|
||||||
locales2.27-3ubuntu1
|
|
||||||
login1:4.5-1ubuntu2
|
|
||||||
lsb-base9.20170808ubuntu1
|
|
||||||
mawk1.3.3-17ubuntu3
|
|
||||||
mount2.31.1-0.4ubuntu3.4
|
|
||||||
multiarch-support2.27-3ubuntu1
|
|
||||||
nano2.9.3-2
|
|
||||||
ncurses-base6.1-1ubuntu1.18.04
|
|
||||||
ncurses-bin6.1-1ubuntu1.18.04
|
|
||||||
netbase5.4
|
|
||||||
net-tools1.60+git20161116.90da8a0-1ubuntu1
|
|
||||||
openssh-client1:7.6p1-4ubuntu0.3
|
|
||||||
openssl1.1.1-1ubuntu2.1~18.04.5
|
|
||||||
passwd1:4.5-1ubuntu2
|
|
||||||
patch2.7.6-2ubuntu1.1
|
|
||||||
perl5.26.1-6ubuntu0.3
|
|
||||||
perl-base5.26.1-6ubuntu0.3
|
|
||||||
perl-modules-5.265.26.1-6ubuntu0.3
|
|
||||||
procps2:3.3.12-3ubuntu1.2
|
|
||||||
publicsuffix20180223.1310-1
|
|
||||||
sed4.4-2
|
|
||||||
sensible-utils0.0.12
|
|
||||||
sudo1.8.21p2-3ubuntu1.1
|
|
||||||
sysvinit-utils2.88dsf-59.10ubuntu1
|
|
||||||
tar1.29b-2ubuntu0.1
|
|
||||||
tzdata2019c-0ubuntu0.18.04
|
|
||||||
ubuntu-keyring2018.09.18.1~18.04.0
|
|
||||||
util-linux2.31.1-0.4ubuntu3.4
|
|
||||||
xauth1:1.0.10-1
|
|
||||||
zlib1g1:1.2.11.dfsg-0ubuntu2
|
|
@ -2,73 +2,26 @@
|
|||||||
|
|
||||||
# project information
|
# project information
|
||||||
project_name: code-server
|
project_name: code-server
|
||||||
project_url: "https://coder.com"
|
full_custom_readme: |
|
||||||
project_logo: "https://github.com/cdr/code-server/raw/master/doc/assets/ide.gif"
|
{% raw -%}
|
||||||
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is VS Code running on a remote server, accessible through the browser.
|
[linuxserverurl]: https://linuxserver.io
|
||||||
|
[forumurl]: https://forum.linuxserver.io
|
||||||
|
|
||||||
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
|
[][linuxserverurl]
|
||||||
|
|
||||||
- If you have a Windows or Mac workstation, more easily develop for Linux.
|
## Contact information:-
|
||||||
|
|
||||||
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
|
| Type | Address/Details |
|
||||||
|
| :---: | --- |
|
||||||
|
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
||||||
|
| Forum | [Linuserver.io forum][forumurl] |
|
||||||
|
|
||||||
- Preserve battery life when you're on the go.
|
|
||||||
|
|
||||||
|
|
||||||
- All intensive computation runs on your server.
|
The code in this branch is not meant for direct consumption. It is a modification layer to add python2 into `linuxserver/code-server`
|
||||||
|
|
||||||
- You're no longer running excess instances of Chrome."
|
The following line is only in this repo for release messaging:
|
||||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
|
||||||
|
|
||||||
# supported architectures
|
- { date: "01.01.50:", desc: "I am the release message for this custom branch" }
|
||||||
available_architectures:
|
{%- endraw %}
|
||||||
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
|
||||||
|
|
||||||
# development version
|
|
||||||
development_versions: true
|
|
||||||
development_versions_items:
|
|
||||||
- { tag: "latest", desc: "Stable releases" }
|
|
||||||
- { tag: "development", desc: "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 not provided, there will be no auth."}
|
|
||||||
- { env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the code-server terminal with the specified password."}
|
|
||||||
|
|
||||||
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
|
|
||||||
```
|
|
||||||
git config --global user.name "username"
|
|
||||||
git config --global user.email "email address"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
# changelog
|
|
||||||
changelogs:
|
|
||||||
- { 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." }
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
mkdir -p /config/{extensions,data,workspace,.ssh}
|
|
||||||
|
|
||||||
if [ -n "${SUDO_PASSWORD}" ]; 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
|
|
||||||
echo "setting sudo password"
|
|
||||||
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# permissions
|
|
||||||
chown -R abc:abc \
|
|
||||||
/config
|
|
6
root/etc/cont-init.d/99-python2
Normal file
6
root/etc/cont-init.d/99-python2
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
echo "**** installing python2 and pip ****"
|
||||||
|
apt-get update && apt-get install -y \
|
||||||
|
python \
|
||||||
|
python-pip
|
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
if [ -n "${PASSWORD}" ]; then
|
|
||||||
AUTH="password"
|
|
||||||
else
|
|
||||||
AUTH="none"
|
|
||||||
echo "starting with no password"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec \
|
|
||||||
s6-setuidgid abc \
|
|
||||||
/usr/bin/code-server \
|
|
||||||
--port 8443 \
|
|
||||||
--user-data-dir /config/data \
|
|
||||||
--extensions-dir /config/extensions \
|
|
||||||
--disable-telemetry \
|
|
||||||
--disable-updates \
|
|
||||||
--auth "${AUTH}" \
|
|
||||||
/config/workspace
|
|
Loading…
x
Reference in New Issue
Block a user