mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-22 20:15:41 +01:00
install using official debs
This commit is contained in:
parent
16909c6274
commit
a1fa7f021e
2
.github/workflows/external_trigger.yml
vendored
2
.github/workflows/external_trigger.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
|
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
|
||||||
echo "**** Retrieving external version ****"
|
echo "**** Retrieving external version ****"
|
||||||
EXT_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|')
|
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||')
|
||||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
echo "**** Can't retrieve external version, exiting ****"
|
echo "**** Can't retrieve external version, exiting ****"
|
||||||
FAILURE_REASON="Can't retrieve external version for code-server branch master"
|
FAILURE_REASON="Can't retrieve external version for code-server branch master"
|
||||||
|
47
Dockerfile
47
Dockerfile
@ -11,51 +11,16 @@ LABEL maintainer="aptalca"
|
|||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install node repo ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
gnupg && \
|
|
||||||
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 && \
|
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
|
||||||
> /etc/apt/sources.list.d/yarn.list && \
|
|
||||||
echo "**** install build dependencies ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
pkg-config \
|
|
||||||
python3 && \
|
|
||||||
echo "**** install runtime dependencies ****" && \
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
nano \
|
|
||||||
net-tools \
|
|
||||||
nodejs \
|
|
||||||
sudo \
|
|
||||||
yarn && \
|
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
curl -o \
|
||||||
npm config set python python3 && \
|
/tmp/code-server.deb -L \
|
||||||
yarn config set network-timeout 600000 -g && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_amd64.deb" && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
dpkg -i /tmp/code-server.deb && \
|
||||||
yarn cache clean && \
|
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
libsecret-1-dev \
|
|
||||||
pkg-config && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
|
@ -11,51 +11,16 @@ LABEL maintainer="aptalca"
|
|||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install node repo ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
gnupg && \
|
|
||||||
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 && \
|
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
|
||||||
> /etc/apt/sources.list.d/yarn.list && \
|
|
||||||
echo "**** install build dependencies ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
pkg-config \
|
|
||||||
python3 && \
|
|
||||||
echo "**** install runtime dependencies ****" && \
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
nano \
|
|
||||||
net-tools \
|
|
||||||
nodejs \
|
|
||||||
sudo \
|
|
||||||
yarn && \
|
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
curl -o \
|
||||||
npm config set python python3 && \
|
/tmp/code-server.deb -L \
|
||||||
yarn config set network-timeout 600000 -g && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_arm64.deb" && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
dpkg -i /tmp/code-server.deb && \
|
||||||
yarn cache clean && \
|
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
libsecret-1-dev \
|
|
||||||
pkg-config && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
|
@ -11,51 +11,16 @@ LABEL maintainer="aptalca"
|
|||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install node repo ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
gnupg && \
|
|
||||||
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 && \
|
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
|
||||||
> /etc/apt/sources.list.d/yarn.list && \
|
|
||||||
echo "**** install build dependencies ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
pkg-config \
|
|
||||||
python3 && \
|
|
||||||
echo "**** install runtime dependencies ****" && \
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
nano \
|
|
||||||
net-tools \
|
|
||||||
nodejs \
|
|
||||||
sudo \
|
|
||||||
yarn && \
|
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
curl -o \
|
||||||
npm config set python python3 && \
|
/tmp/code-server.deb -L \
|
||||||
yarn config set network-timeout 600000 -g && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_armhf.deb" && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
dpkg -i /tmp/code-server.deb && \
|
||||||
yarn cache clean && \
|
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev \
|
|
||||||
libsecret-1-dev \
|
|
||||||
pkg-config && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -104,7 +104,7 @@ pipeline {
|
|||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = sh(
|
||||||
script: ''' curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|' ''',
|
script: ''' curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||' ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
env.RELEASE_LINK = 'custom_command'
|
env.RELEASE_LINK = 'custom_command'
|
||||||
}
|
}
|
||||||
|
@ -266,6 +266,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **20.02.22:** - Install using the official debs.
|
||||||
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
|
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
|
||||||
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
|
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
|
||||||
* **29.11.21:** - Rebase to Ubuntu focal.
|
* **29.11.21:** - Rebase to Ubuntu focal.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-code-server
|
project_name: docker-code-server
|
||||||
external_type: na
|
external_type: na
|
||||||
custom_version_command: "curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '.\"dist-tags\".latest' | sed 's|^|v|'"
|
custom_version_command: "curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||'"
|
||||||
release_type: stable
|
release_type: stable
|
||||||
release_tag: latest
|
release_tag: latest
|
||||||
ls_branch: master
|
ls_branch: master
|
||||||
|
@ -77,6 +77,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "20.02.22:", desc: "Install using the official debs." }
|
||||||
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
|
- { 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: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
|
||||||
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
|
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
|
||||||
|
@ -15,7 +15,7 @@ fi
|
|||||||
|
|
||||||
exec \
|
exec \
|
||||||
s6-setuidgid abc \
|
s6-setuidgid abc \
|
||||||
/usr/local/bin/code-server \
|
/usr/lib/code-server/bin/code-server \
|
||||||
--bind-addr 0.0.0.0:8443 \
|
--bind-addr 0.0.0.0:8443 \
|
||||||
--user-data-dir /config/data \
|
--user-data-dir /config/data \
|
||||||
--extensions-dir /config/extensions \
|
--extensions-dir /config/extensions \
|
||||||
|
Loading…
Reference in New Issue
Block a user