伐柯伐柯*其則不遠*我覬之子*籩豆有踐

31 , 7月2018

laradock安装过程中workspace镜像启动失败的问题

准备把homestead迁往laradock。安装的时候出现了一点小问题

准备把homestead迁往laradock。安装的时候出现了一点小问题,记录一下。

1.yarn下载超时的问题

> Downloading tarball…

[1/2]: https://yarnpkg.com/latest.tar.gz –> /tmp/yarn.tar.gz.nDHVnxd6S7
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 93 100 93 0 0 197 0 –:–:– –:–:– –:–:– 197
100 609 0 609 0 0 453 0 –:–:– 0:00:01 –:–:– 594k
0 1211k 0 0 0 0 0 0 –:–:– 0:05:14 –:–:– 0
curl: (56) GnuTLS recv error (-54): Error in the pull function.

[2/2]: https://yarnpkg.com/latest.tar.gz.asc –> /tmp/yarn.tar.gz.nDHVnxd6S7.asc
100 97 100 97 0 0 682 0 –:–:– –:–:– –:–:– 682
100 613 0 613 0 0 110 0 –:–:– 0:00:05 –:–:– 157
0 0 0 0 0 0 0 0 –:–:– 0:02:45 –:–:– 0

0 0 0 0 0 0 0 0 –:–:– 0:02:46 –:–:– 0
0 0 0 0 0 0 0 0 –:–:– 0:04:05 –:–:– 0
curl: (35) gnutls_handshake() failed: Error in the pull function.
> Failed to download https://yarnpkg.com/latest.tar.gz.
ERROR: Service ‘workspace’ failed to build: The command ‘/bin/sh -c if [ ${INSTALL_YARN} = true ]; then [ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh” && if [ ${YARN_VERSION} = “latest” ]; then curl -o- -L https://yarnpkg.com/install.sh | bash; else curl -o- -L https://yarnpkg.com/install.sh | bash -s — –version ${YARN_VERSION}; fi && echo “” >> ~/.bashrc && echo ‘export PATH=”$HOME/.yarn/bin:$PATH”‘ >> ~/.bashrc ;fi’ returned a non-zero code: 1

这个很明显是不可描述的原因。但是这个好办。从workspace的dockerfile来看,他首先是下载curl -o- -L https://yarnpkg.com/install.sh | bash -s — –version ${YARN_VERSION}; install.sh然后执行这个shell,那么yarn的安装包实际上是在这个shell里面定义的。

yarn_get_tarball() {
  printf "$cyan> Downloading tarball...$reset\n"
  if [ "$1" = '--nightly' ]; then
    url=https://nightly.yarnpkg.com/latest.tar.gz
...

我们只需要把文件下载下来,然后改动一下这个shell脚本就行。

2. GPG校验不通过的问题

gpg: keyring `/home/laradock/.gnupg/secring.gpg' created
gpg: key 86E50310: public key "Yarn Packaging <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
gpg: Signature made Fri 12 Jul 2019 02:31:25 PM UTC using RSA key ID 69475BAA
gpg: BAD signature from "Yarn Packaging <[email protected]>"
> GPG signature for this Yarn release is invalid! This is BAD and may mean the release has been tampered with. It is strongly recommended that you report this to the Yarn developers.
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTALL_YARN} = true ]; then [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && if [ ${YARN_VERSION} = "latest" ]; then curl -o- -L https://yarnpkg.com/install.sh | bash; else curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; fi && echo "" >> ~/.bashrc && echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc ;fi' returned a non-zero code: 1

这个简单,安装之前先更新GPGKEY

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --import

 

3.php-fpm镜像redis模块安装失败

Package "redis" does not have REST info xml available
install failed
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c if [ ${INSTALL_PHPREDIS} = true ]; then     printf "\n" | pecl install -o -f redis-5.0.0     &&  rm -rf /tmp/pear     &&  docker-php-ext-enable redis ;fi' returned a non-zero code: 1

换一个老的版本就行了

printf "\n" | pecl install -o -f redis-4.3.0 \

 

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

© 2011 - 2024 laijim.com