mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-26 22:15:41 +01:00
Merge pull request #28 from linuxserver/url
Multi-arch, install via npm
This commit is contained in:
commit
c124f2c48d
34
Dockerfile
34
Dockerfile
@ -11,28 +11,44 @@ LABEL maintainer="aptalca"
|
|||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install dependencies ****" && \
|
echo "**** install node repo ****" && \
|
||||||
apt-get update && \
|
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_12.x bionic main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
libx11-dev \
|
||||||
|
libxkbfile-dev \
|
||||||
|
libsecret-1-dev \
|
||||||
|
pkg-config && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
nodejs \
|
||||||
sudo && \
|
sudo && \
|
||||||
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://api.github.com/repos/cdr/code-server/releases/latest" \
|
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_URL=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/tags/${CODE_RELEASE}" \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
| jq -r '.assets[] | select(.browser_download_url | contains("linux-x86_64")) | .browser_download_url') && \
|
npm install --unsafe-perm -g code-server@"$CODE_VERSION" && \
|
||||||
mkdir -p /app/code-server && \
|
|
||||||
curl -o \
|
|
||||||
/tmp/code.tar.gz -L \
|
|
||||||
"${CODE_URL}" && \
|
|
||||||
tar xzf /tmp/code.tar.gz -C \
|
|
||||||
/app/code-server --strip-components=1 && \
|
|
||||||
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 \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
|
61
Dockerfile.aarch64
Normal file
61
Dockerfile.aarch64
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
FROM lsiobase/ubuntu:arm64v8-bionic
|
||||||
|
|
||||||
|
# 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 ****" && \
|
||||||
|
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_12.x bionic main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
libx11-dev \
|
||||||
|
libxkbfile-dev \
|
||||||
|
libsecret-1-dev \
|
||||||
|
pkg-config && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
nodejs \
|
||||||
|
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_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
|
npm install --unsafe-perm -g code-server@"$CODE_VERSION" && \
|
||||||
|
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 \
|
||||||
|
/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/*
|
||||||
|
|
||||||
|
# add local files
|
||||||
|
COPY /root /
|
||||||
|
|
||||||
|
# ports and volumes
|
||||||
|
EXPOSE 8443
|
61
Dockerfile.armhf
Normal file
61
Dockerfile.armhf
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
FROM lsiobase/ubuntu:arm32v7-bionic
|
||||||
|
|
||||||
|
# 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 ****" && \
|
||||||
|
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_12.x bionic main' \
|
||||||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
|
echo "**** install build dependencies ****" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
libx11-dev \
|
||||||
|
libxkbfile-dev \
|
||||||
|
libsecret-1-dev \
|
||||||
|
pkg-config && \
|
||||||
|
echo "**** install runtime dependencies ****" && \
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
nodejs \
|
||||||
|
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_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
|
npm install --unsafe-perm -g code-server@"$CODE_VERSION" && \
|
||||||
|
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 \
|
||||||
|
/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/*
|
||||||
|
|
||||||
|
# add local files
|
||||||
|
COPY /root /
|
||||||
|
|
||||||
|
# ports and volumes
|
||||||
|
EXPOSE 8443
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -27,7 +27,7 @@ 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='true'
|
CI='true'
|
||||||
CI_WEB='true'
|
CI_WEB='true'
|
||||||
CI_PORT='8443'
|
CI_PORT='8443'
|
||||||
|
@ -57,6 +57,8 @@ The architectures supported by this image are:
|
|||||||
| Architecture | Tag |
|
| Architecture | Tag |
|
||||||
| :----: | --- |
|
| :----: | --- |
|
||||||
| x86-64 | amd64-latest |
|
| x86-64 | amd64-latest |
|
||||||
|
| arm64 | arm64v8-latest |
|
||||||
|
| armhf | arm32v7-latest |
|
||||||
|
|
||||||
## Version Tags
|
## Version Tags
|
||||||
|
|
||||||
@ -234,6 +236,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **18.05.20:** - Switch to multi-arch images, install via npm.
|
||||||
* **29.04.20:** - Update start arguments.
|
* **29.04.20:** - Update start arguments.
|
||||||
* **01.04.20:** - Structural changes required for v3.
|
* **01.04.20:** - Structural changes required for v3.
|
||||||
* **17.01.20:** - Fix artifact url retrieval from github.
|
* **17.01.20:** - Fix artifact url retrieval from github.
|
||||||
|
@ -18,7 +18,7 @@ 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='true'
|
- CI='true'
|
||||||
- CI_WEB='true'
|
- CI_WEB='true'
|
||||||
- CI_PORT='8443'
|
- CI_PORT='8443'
|
||||||
|
@ -22,6 +22,8 @@ project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_
|
|||||||
# supported architectures
|
# supported architectures
|
||||||
available_architectures:
|
available_architectures:
|
||||||
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||||
|
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||||
|
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
|
||||||
|
|
||||||
# development version
|
# development version
|
||||||
development_versions: true
|
development_versions: true
|
||||||
@ -65,6 +67,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
|
||||||
- { date: "29.04.20:", desc: "Update start arguments." }
|
- { date: "29.04.20:", desc: "Update start arguments." }
|
||||||
- { date: "01.04.20:", desc: "Structural changes required for v3." }
|
- { date: "01.04.20:", desc: "Structural changes required for v3." }
|
||||||
- { date: "17.01.20:", desc: "Fix artifact url retrieval from github." }
|
- { date: "17.01.20:", desc: "Fix artifact url retrieval from github." }
|
||||||
|
@ -9,11 +9,10 @@ fi
|
|||||||
|
|
||||||
exec \
|
exec \
|
||||||
s6-setuidgid abc \
|
s6-setuidgid abc \
|
||||||
/app/code-server/code-server \
|
/usr/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 \
|
||||||
--disable-telemetry \
|
--disable-telemetry \
|
||||||
--disable-updates \
|
|
||||||
--auth "${AUTH}" \
|
--auth "${AUTH}" \
|
||||||
/config/workspace
|
/config/workspace
|
||||||
|
Loading…
Reference in New Issue
Block a user