mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-26 18:23:11 -04:00
code-server:julia initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
gh_lates() {
|
||||
curl -s https://api.github.com/repos/$1/$2/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d '\"\ v,'
|
||||
}
|
||||
|
||||
download_vsix() {
|
||||
wget -qO $1.$2-$3.vsix https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/$3/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
|
||||
}
|
||||
|
||||
# replace these with specific versions if needed (i.e 1.7.2 for Julia)
|
||||
JULIA_VERSION=$(gh_latest julialang julia)
|
||||
JULIA_VSCODE_VERSION=$(gh_latest julia-vscode julia-vscode)
|
||||
VSCODE_FORMAT_VERSION=1.0.4
|
||||
JULIA_FORMATTER_VERSION=$(gh_latest singularitti vscode-julia-formatter)
|
||||
ANACONDA_VERSION=latest
|
||||
|
||||
# Julia
|
||||
cd /usr/local/bin \
|
||||
&& sudo mkdir julia_dir \
|
||||
&& cd julia_dir \
|
||||
&& sudo wget -q -q https://julialang-s3.julialang.org/bin/linux/x64/`echo ${JULIA_VERSION} | cut -d. -f 1,2`/julia-${JULIA_VERSION}-linux-x86_64.tar.gz \
|
||||
&& sudo tar fxz julia-${JULIA_VERSION}-linux-x86_64.tar.gz \
|
||||
&& sudo rm -R julia-${JULIA_VERSION}-linux-x86_64.tar.gz \
|
||||
&& cd .. \
|
||||
&& sudo ln -s julia_dir/julia-${JULIA_VERSION}/bin/julia julia
|
||||
|
||||
|
||||
RUN cd /home/coder/project/ \
|
||||
&& sudo wget -q https://github.com/julia-vscode/julia-vscode/releases/download/v${JULIA_VSCODE_VERSION}/language-julia-${JULIA_VSCODE_VERSION}.vsix \
|
||||
&& code-server --install-extension language-julia-${JULIA_VSCODE_VERSION}.vsix \
|
||||
&& sudo rm language-julia-${JULIA_VSCODE_VERSION}.vsix \
|
||||
# latex-input
|
||||
#&& code-server --install-extension yellpika.latex-input \
|
||||
# vscode-format-context-menu
|
||||
&& download_vsix lacroixdavid1 vscode-format-context-menu ${VSCODE_FORMAT_VERSION} \
|
||||
&& code-server --install-extension lacroixdavid1.vscode-format-context-menu-${VSCODE_FORMAT_VERSION}.vsix \
|
||||
&& sudo rm lacroixdavid1.vscode-format-context-menu-${VSCODE_FORMAT_VERSION}.vsix \
|
||||
# vscode-julia-formatter
|
||||
&& download_vsix singularitti vscode-julia-formatter ${JULIA_FORMATTER_VERSION} \
|
||||
&& code-server --install-extension singularitti.vscode-julia-formatter-${JULIA_FORMATTER_VERSION}.vsix \
|
||||
&& sudo rm singularitti.vscode-julia-formatter-${JULIA_FORMATTER_VERSION}.vsix
|
||||
# better-toml
|
||||
#&& code-server --install-extension bungcip.better-toml
|
||||
|
||||
|
||||
chown -R root:root /root
|
||||
chmod -R 600 /root/.ssh
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Determine if setup is needed
|
||||
if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \
|
||||
[ -f /usr/bin/apt ]; then
|
||||
## Ubuntu
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y \
|
||||
iptables \
|
||||
openssh-client \
|
||||
python3 \
|
||||
python3-pip
|
||||
pip3 install sshuttle
|
||||
fi
|
||||
if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \
|
||||
[ -f /sbin/apk ]; then
|
||||
# Alpine
|
||||
apk add --no-cache \
|
||||
iptables \
|
||||
openssh \
|
||||
py3-pip \
|
||||
python3
|
||||
pip3 install sshuttle
|
||||
fi
|
||||
|
||||
chown -R root:root /root
|
||||
chmod -R 600 /root/.ssh
|
||||
Reference in New Issue
Block a user