This repository has been archived by the owner on Apr 21, 2024. It is now read-only.
/
Dockerfile
65 lines (53 loc) · 1.54 KB
/
Dockerfile
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
FROM ghcr.io/mikojs/base:main as base
FROM ghcr.io/mikojs/code-server:main
# install packages
RUN apk add \
# git
git \
less \
# gh
github-cli \
# vim
vim \
# zsh
zsh \
zsh-vcs \
# other commands
openssh \
tree \
tmux
RUN yarn global add \
commitizen \
cz-conventional-changelog
# gh
RUN gh config set -h github.com git_protocol ssh && \
gh config set editor vim
# vim
RUN git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# zsh
RUN curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | \
sh
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
RUN git clone https://github.com/sindresorhus/pure ~/.zsh/pure
# rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
# code-server
RUN code-server --install-extension vscodevim.vim
RUN code-server --install-extension shardulm94.trailing-spaces
RUN code-server --install-extension ms-azuretools.vscode-docker
RUN code-server --install-extension GrapeCity.gc-excelviewer
RUN code-server --install-extension sndst00m.markdown-github-dark-pack
RUN code-server --install-extension rust-lang.rust-analyzer
# config
COPY ./root /root
RUN vim +PluginInstall +qall &>/dev/null
# bin
COPY --from=base /bin/ddocker /bin/ddocker
COPY --from=base /bin/dpsql /bin/dpsql
# cache
ENV NPM_CONFIG_CACHE=/root/.cache/.npm
ENV CARGO_HOME=/root/.cache/.cargo
ENV HISTFILE=/root/.cache/zsh_history
## volumes
VOLUME ["/root/.ssh", "/root/.cache"]