Spaces:
Running
Running
File size: 5,882 Bytes
26cb7ad f4da2fb 26cb7ad bc487d1 26cb7ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
FROM archlinux:latest
RUN echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf \
&& echo -e "[archlinuxcn]\nServer = https://mirrors.aliyun.com/archlinuxcn/\$arch" >> /etc/pacman.conf \
&& echo -e "[chaotic-aur]\nServer = https://geo-mirror.chaotic.cx/\$repo/\$arch" >> /etc/pacman.conf \
&& echo -e "[atri]\nServer = https://repo.apeiria.net/\$arch" >> /etc/pacman.conf
RUN pacman-key --init \
&& pacman-key --lsign-key "[email protected]" \
&& pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com \
&& pacman-key --lsign-key 3056513887B78AEB \
&& pacman-key --recv-keys 293B93D8A471059F85D716A65BA92099D9BE2DAA \
&& pacman-key --lsign-key 293B93D8A471059F85D716A65BA92099D9BE2DAA \
&& pacman -Sy --noconfirm archlinuxcn-keyring
RUN pacman -Syu --noconfirm yay
RUN yay -S --noconfirm \
aria2 \
base-devel \
clang \
cmake \
code-server \
code-server-marketplace \
curl \
deno \
direnv \
fisher \
fish \
gcc \
git \
git-lfs \
go \
intel-oneapi-basekit \
jq \
nix \
nodejs \
openblas64 \
openssh \
p7zip \
pkgconf \
pkgfile \
pypy \
python \
python-pip \
ruff \
rust \
rye \
screen \
tinygo \
unzip \
uv \
wget \
xmake \
zig \
zip \
&& yay -Scc --noconfirm \
&& rm -rf /var/cache/pacman/*
RUN aria2c -c -x16 https://hf-mirror.com/hfd/hfd.sh \
&& chmod a+x hfd.sh \
&& mv hfd.sh /usr/bin/hfd
RUN pkgfile --update
RUN git lfs install
RUN corepack prepare pnpm@latest \
&& corepack enable pnpm
COPY fish-oneapi /usr/bin/fish-oneapi
RUN chmod +x /usr/bin/fish-oneapi
RUN useradd -m -s /usr/bin/fish-oneapi mzwing
USER mzwing
WORKDIR /home/mzwing
RUN mkdir -p /home/mzwing/.ssh
RUN plugins=( \
"danhper/fish-ssh-agent" \
"jethrokuan/z" \
"franciscolourenco/done" \
"jorgebucaran/autopair.fish" \
) \
&& for plugin in "${plugins[@]}"; do \
fish -c "fisher install $plugin"; \
done
RUN rye toolchain register /usr/bin/python \
&& rye toolchain register /usr/bin/pypy
RUN fish -c 'SHELL=/usr/bin/fish pnpm setup' \
&& fish -c 'SHELL=/usr/bin/fish pnpm -g add pnpm'
RUN fish -c 'SHELL=/usr/bin/fish pnpm setup' \
&& fish -c 'SHELL=/usr/bin/fish pnpm -g add pnpm'
RUN mkdir -p /home/mzwing/.config/code-server/ \
&& touch /home/mzwing/.config/code-server/config.yaml \
&& echo -e "bind-addr: 0.0.0.0:8080\nauth: password\ncert: false" > /home/mzwing/.config/code-server/config.yaml
RUN extensions=( \
"aaron-bond.better-comments" \
"ahmadalli.vscode-nginx-conf" \
"alefragnani.bookmarks" \
"aminer.codegeex" \
"antfu.browse-lite" \
"antfu.vite" \
"arrterian.nix-env-selector" \
"bbenoist.nix" \
"bierner.lit-html" \
"christian-kohler.npm-intellisense" \
"christian-kohler.path-intellisense" \
"claui.packaging" \
"codeium.codeium" \
"codezombiech.gitignore" \
"dart-code.dart-code" \
"dart-code.flutter" \
"davidanson.vscode-markdownlint" \
"dbaeumer.vscode-eslint" \
"denoland.vscode-deno" \
"donjayamanne.githistory" \
"eamodio.gitlens" \
"editorconfig.editorconfig" \
"esbenp.prettier-vscode" \
"fill-labs.dependi" \
"formulahendry.auto-close-tag" \
"formulahendry.auto-rename-tag" \
"gera2ld.markmap-vscode" \
"get-snippets.get-snippets" \
"github.codespaces" \
"github.copilot" \
"github.copilot-chat" \
"github.remotehub" \
"github.vscode-github-actions" \
"golang.go" \
"graphql.vscode-graphql-syntax" \
"gruntfuggly.todo-tree" \
"jeff-hykin.better-dockerfile-syntax" \
"jnoortheen.nix-ide" \
"justjavac.vscode-deno-extensionpack" \
"laurencebahiirwa.deno-std-lib-snippets" \
"lit.lit-snippets" \
"matthewpi.caddyfile-support" \
"mechatroner.rainbow-csv" \
"mhutchie.git-graph" \
"mirone.milkdown" \
"misterj.vue-volar-extention-pack" \
"mkhl.direnv" \
"mrmlnc.vscode-json5" \
"ms-dotnettools.csdevkit" \
"ms-dotnettools.csharp" \
"ms-dotnettools.vscode-dotnet-runtime" \
"ms-dotnettools.vscodeintellicode-csharp" \
"ms-python.black-formatter" \
"ms-python.debugpy" \
"ms-python.python" \
"ms-python.vscode-pylance" \
"ms-toolsai.jupyter" \
"ms-toolsai.jupyter-keymap" \
"ms-toolsai.jupyter-renderers" \
"ms-toolsai.vscode-jupyter-cell-tags" \
"ms-toolsai.vscode-jupyter-slideshow" \
"ms-vscode.azure-repos" \
"ms-vscode.cmake-tools" \
"ms-vscode.cpptools" \
"ms-vscode.cpptools-extension-pack" \
"ms-vscode.cpptools-themes" \
"ms-vscode.remote-repositories" \
"msyrus.go-doc" \
"njpwerner.autodocstring" \
"oderwat.indent-rainbow" \
"pinage404.nix-extension-pack" \
"redhat.vscode-xml" \
"redhat.vscode-yaml" \
"rickyang.ocopilot" \
"rust-lang.rust-analyzer" \
"rxliuli.tsx" \
"saoudrizwan.claude-dev" \
"sibiraj-s.vscode-scss-formatter" \
"swellaby.rust-pack" \
"syler.sass-indented" \
"tabnine.tabnine-vscode" \
"tamasfe.even-better-toml" \
"timonwong.shellcheck" \
"twxs.cmake" \
"visualstudioexptteam.intellicode-api-usage-examples" \
"visualstudioexptteam.vscodeintellicode" \
"visualstudioexptteam.vscodeintellicode-completions" \
"vitaliymaz.vscode-svg-previewer" \
"vitest.explorer" \
"vue.volar" \
"wayou.vscode-todo-highlight" \
) \
&& for extension in "${extensions[@]}"; do \
code-server --config /home/mzwing/.config/code-server/config.yaml --install-extension "$extension"; \
done
RUN code-server --config /home/mzwing/.config/code-server/config.yaml --uninstall-extension "serayuzgur.crates"
EXPOSE 8080
CMD ["code-server", "--config", "/home/mzwing/.config/code-server/config.yaml"] |