-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workspace cannot clone nvm #2677
Comments
Aha, I had the problem also. Bro, your issue had solved? Friends of Yunnan. I come from Guizhou. |
I edited the workspace below the docker. Yml file, first of all, I put the https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh download this file first, and then copy to the workspace container, to build the workspace can, if you still can't start to succeed, you can consider import, need image can contact me,You can refer to my blog processing methods: http://doc.orangbus.cn/Docker/ |
@orangbus #2459 (comment) |
Chinese ali cloud server because raw.githubusercontent.com don't have access to cause the failure of the clone NVM, I was solved this problem by adjusting the DockerFile file, if your problem in the same way as I hope this will be helpful to you. My solution is to get the IP of the disabled domain name through the IPAddress site, and provide the domain name resolution locally to point to the corresponding IP. However, this can only be done by root, and the laradock account will report sudo problem, so I first used root to adjust and pull the resource, and finally modified the resource information into the information of laradock host the code in docker file : USER root
ENV NVM_DIR /home/laradock/.nvm
RUN echo "199.232.96.133 githubusercontent.com">>/etc/hosts \
&& echo "199.232.96.133 raw.githubusercontent.com" >>/etc/hosts\
&& mkdir -p $NVM_DIR \
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
&& chown laradock.laradock $NVM_DIR
USER laradock
RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager)
. $NVM_DIR/nvm.sh \
&& nvm install ${NODE_VERSION} \
&& nvm use ${NODE_VERSION} \
&& nvm alias ${NODE_VERSION} \
&& npm config set fetch-retries ${NPM_FETCH_RETRIES} \
&& npm config set fetch-retry-factor ${NPM_FETCH_RETRY_FACTOR} \
&& npm config set fetch-retry-mintimeout ${NPM_FETCH_RETRY_MINTIMEOUT} \
&& npm config set fetch-retry-maxtimeout ${NPM_FETCH_RETRY_MAXTIMEOUT} \
&& if [ ${NPM_REGISTRY} ]; then \
npm config set registry ${NPM_REGISTRY} \
;fi \
&& if [ ${INSTALL_NPM_GULP} = true ]; then \
npm install -g gulp \
;fi \
&& if [ ${INSTALL_NPM_BOWER} = true ]; then \
npm install -g bower \
;fi \
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
npm install -g @vue/cli \
;fi \
&& if [ ${INSTALL_NPM_ANGULAR_CLI} = true ]; then \
npm install -g @angular/cli \
;fi \
&& ln -s `npm bin --global` /home/laradock/.node-bin \
;fi |
thank you , I solved it in a different way,First, I run on the server where Laradock can be installed, then I use |
when i run
docker-compose up -d workspace
,i cannotcurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh
and `` ,it tip mebut ,in my terminal i can run successful , so i can`t solve it.
The text was updated successfully, but these errors were encountered: