在进行docker-compose up -d nginx mysql时,报错如下:

  1. % Total % Received % Xferd Average Speed Time Time Time Current
  2. Dload Upload Total Spent Left Speed
  3. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
  4. /bin/sh: 1: .: Can't open /home/laradock/.nvm/nvm.sh
  5. ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTALL_NODE} = true ]; then mkdir -p $NVM_DIR && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && . $NVM_DIR/nvm.sh && nvm install ${NODE_VERSION} && nvm use ${NODE_VERSION} && nvm alias ${NODE_VERSION} && 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' returned a non-zero code: 2

在host文件加上这个,就可以了。

  1. 199.232.28.133 raw.githubusercontent.com

用了这个,完美解决。你猜下是什么原因???请不要问我,反正我是不懂。只是知道这样子就解决问题了,记录一下。心累。

分类: web

标签:   laradock