-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
105 lines (80 loc) · 3.32 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
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
FROM localhost/mooxe/base:dev
# MAINTAINER FooTearth "footearth@gmail.com"
WORKDIR /root
# update
RUN apt-fast update && \
apt-fast upgrade -y
RUN apt-fast install -y make g++
# nvm
ENV NVM_VERSION 0.37.0
# nvm - zsh spport
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash && \
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.profile && \
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.profile
# nvm - fish upport
# RUN fish -lc "fisher edc/bass nvm"
RUN fish -lc "omf i bass nvm"
# RUN echo "\
# function nvm\n\
# bass source ~/.nvm/nvm.sh --no-use ';' nvm \$argv\n\
# end" >> ~/.config/fish/config.fish
# git clone https://github.com/passcod/nvm-fish-wrapper.git ~/.config/fish/nvm-wrapper && \
# echo ". ~/.config/fish/nvm-wrapper/nvm.fish" >> ~/.config/fish/config.fish
# npm
ENV NODE_VERSION_LTS 14.16.1
ENV NODE_VERSION 16.1.0
RUN cp -f ~/.nvm/nvm.sh ~/.nvm/nvm-tmp.sh && \
echo "nvm install v$NODE_VERSION_LTS" >> ~/.nvm/nvm-tmp.sh && \
echo "nvm install v$NODE_VERSION" >> ~/.nvm/nvm-tmp.sh && \
echo "nvm alias 14 $NODE_VERSION_LTS" >> ~/.nvm/nvm-tmp.sh && \
echo "nvm alias 16 $NODE_VERSION" >> ~/.nvm/nvm-tmp.sh && \
echo "nvm alias default 14" >> ~/.nvm/nvm-tmp.sh && \
bash ~/.nvm/nvm-tmp.sh && \
rm ~/.nvm/nvm-tmp.sh && \
cp /etc/profile /etc/profile.bak && \
echo '. ~/.nvm/nvm.sh' >> /etc/profile
# Yarn
RUN bash -lc "curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -" && \
bash -lc "echo 'deb https://dl.yarnpkg.com/debian/ stable main' | tee /etc/apt/sources.list.d/yarn.list" && \
apt-fast install -y apt-transport-https
# RUN apt-fast update && apt-fast install --no-install-recommends -y yarn
# RUN \
# apt-fast autoremove -y && \
# apt-fast autoclean && \
# rm -rf /var/lib/apt/lists/*
# echo "nvm use default" >> ~/.nvm/nvm-tmp.sh && \
RUN /bin/bash -lc 'nvm use default'
RUN /bin/bash -lc 'npm i -g npm'
RUN /bin/bash -lc 'npm i -g yarn'
# RUN yarn config set registry https://registry.npm.taobao.org
# global package
# RUN /bin/bash -lc 'npm install -g cnpm \
# --registry=https://registry.npm.taobao.org'
# -- npm root -g
# -- yarn global bin
# -- yarn global dir
# NODE_PATH
# PATH
# RUN /bin/bash -lc "yarn config set prefix $(npm root -g)/../../"
# -- --global-folder
# RUN echo "--global-folder \"$(bash -lc 'npm root -g')/../\"" \
# >> ~/.yarnrc
# RUN /bin/bash -lc 'yarn global add yrm'
RUN /bin/bash -lc 'yarn global add nnrm'
RUN /bin/bash -lc 'nnrm use taobao'
# -- --global-folder
# RUN echo "--global-folder \"$(bash -lc 'npm root -g')/../\"" \
# >> ~/.yarnrc
RUN /bin/bash -lc 'yarn global add npm yarn'
RUN /bin/bash -lc 'yarn global add node-gyp'
# RUN /bin/bash -lc 'yarn global add node-inspector'
RUN /bin/bash -lc 'yarn global add pnpm npm-check'
# RUN /bin/bash -lc 'yarn global add coffeescript'
# RUN /bin/bash -lc 'yarn global add rollup gulp-cli'
# RUN yarn global add harp
RUN /bin/bash -lc 'yarn global add supervisor nodemon forever pm2'
RUN /bin/bash -lc 'yarn global add serve http-server'
# RUN /bin/bash -lc 'yarn global add lerna autod'
# RUN /bin/bash -lc 'yarn global add json-server'
# RUN /bin/bash -lc 'yarn global add now'
RUN echo "unsafe-perm = true" >> ~/.npmrc