mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-12-22 18:37:43 +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
|
||||
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 -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
|
||||
echo "**** Can't retrieve external version, exiting ****"
|
||||
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"
|
||||
|
||||
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 ****" && \
|
||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||
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 && \
|
||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||
npm config set python python3 && \
|
||||
yarn config set network-timeout 600000 -g && \
|
||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
curl -o \
|
||||
/tmp/code-server.deb -L \
|
||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_amd64.deb" && \
|
||||
dpkg -i /tmp/code-server.deb && \
|
||||
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 \
|
||||
/config/* \
|
||||
/tmp/* \
|
||||
|
@ -11,51 +11,16 @@ LABEL maintainer="aptalca"
|
||||
ENV HOME="/config"
|
||||
|
||||
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 ****" && \
|
||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||
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 && \
|
||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||
npm config set python python3 && \
|
||||
yarn config set network-timeout 600000 -g && \
|
||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
curl -o \
|
||||
/tmp/code-server.deb -L \
|
||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_arm64.deb" && \
|
||||
dpkg -i /tmp/code-server.deb && \
|
||||
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 \
|
||||
/config/* \
|
||||
/tmp/* \
|
||||
|
@ -11,51 +11,16 @@ LABEL maintainer="aptalca"
|
||||
ENV HOME="/config"
|
||||
|
||||
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 ****" && \
|
||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||
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 && \
|
||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||
npm config set python python3 && \
|
||||
yarn config set network-timeout 600000 -g && \
|
||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
curl -o \
|
||||
/tmp/code-server.deb -L \
|
||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_armhf.deb" && \
|
||||
dpkg -i /tmp/code-server.deb && \
|
||||
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 \
|
||||
/config/* \
|
||||
/tmp/* \
|
||||
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -104,7 +104,7 @@ pipeline {
|
||||
steps{
|
||||
script{
|
||||
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()
|
||||
env.RELEASE_LINK = 'custom_command'
|
||||
}
|
||||
|
@ -266,6 +266,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **20.02.22:** - Install using the official debs.
|
||||
* **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.
|
||||
|
@ -3,7 +3,7 @@
|
||||
# jenkins variables
|
||||
project_name: docker-code-server
|
||||
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_tag: latest
|
||||
ls_branch: master
|
||||
|
@ -77,6 +77,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
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: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
|
||||
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
|
||||
|
@ -15,7 +15,7 @@ fi
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc \
|
||||
/usr/local/bin/code-server \
|
||||
/usr/lib/code-server/bin/code-server \
|
||||
--bind-addr 0.0.0.0:8443 \
|
||||
--user-data-dir /config/data \
|
||||
--extensions-dir /config/extensions \
|
||||
|
Loading…
Reference in New Issue
Block a user