mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-12-23 10:57:43 +01:00
Merge pull request #32 from linuxserver/yarn
shrink image, install via yarn, fix arm build
This commit is contained in:
commit
7fb25d3ff4
10
Dockerfile
10
Dockerfile
@ -18,6 +18,9 @@ RUN \
|
||||
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 && \
|
||||
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 \
|
||||
@ -33,14 +36,17 @@ RUN \
|
||||
nano \
|
||||
net-tools \
|
||||
nodejs \
|
||||
sudo && \
|
||||
sudo \
|
||||
yarn && \
|
||||
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" && \
|
||||
yarn --production global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
ln -s /node_modules/.bin/code-server /usr/bin/code-server && \
|
||||
echo "**** clean up ****" && \
|
||||
apt-get purge --auto-remove -y \
|
||||
build-essential \
|
||||
|
@ -18,6 +18,9 @@ RUN \
|
||||
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 && \
|
||||
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 \
|
||||
@ -33,14 +36,17 @@ RUN \
|
||||
nano \
|
||||
net-tools \
|
||||
nodejs \
|
||||
sudo && \
|
||||
sudo \
|
||||
yarn && \
|
||||
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" && \
|
||||
yarn --production global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
ln -s /node_modules/.bin/code-server /usr/bin/code-server && \
|
||||
echo "**** clean up ****" && \
|
||||
apt-get purge --auto-remove -y \
|
||||
build-essential \
|
||||
|
@ -18,6 +18,9 @@ RUN \
|
||||
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 && \
|
||||
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 \
|
||||
@ -33,14 +36,17 @@ RUN \
|
||||
nano \
|
||||
net-tools \
|
||||
nodejs \
|
||||
sudo && \
|
||||
sudo \
|
||||
yarn && \
|
||||
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" && \
|
||||
yarn --production global add code-server@"$CODE_VERSION" && \
|
||||
yarn cache clean && \
|
||||
ln -s /node_modules/.bin/code-server /usr/bin/code-server && \
|
||||
echo "**** clean up ****" && \
|
||||
apt-get purge --auto-remove -y \
|
||||
build-essential \
|
||||
|
@ -236,6 +236,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **21.05.20:** - Shrink images, install via yarn, fix arm32v7 build.
|
||||
* **18.05.20:** - Switch to multi-arch images, install via npm.
|
||||
* **29.04.20:** - Update start arguments.
|
||||
* **01.04.20:** - Structural changes required for v3.
|
||||
|
@ -67,6 +67,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "21.05.20:", desc: "Shrink images, install via yarn, fix arm32v7 build." }
|
||||
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
|
||||
- { date: "29.04.20:", desc: "Update start arguments." }
|
||||
- { date: "01.04.20:", desc: "Structural changes required for v3." }
|
||||
|
Loading…
Reference in New Issue
Block a user