skip to Main Content

docker blocks when running the command:

docker-compose build nginx php-fpm workspace mysql redis redis-webui adminer;

gives the the following error:

CACHED [workspace 50/116] RUN if [ false = true ]; then if [ 8.3 != "8.3" ] && [ 8.3 != "8.0" ];  then curl -L -o /tmp/ioncube_loaders_lin 0.0s
CACHED [workspace 51/116]  RUN if [ false = true ]; then apt-get -y install mysql-client && curl https://github.com/hechoendrupal/drupal-console-1 0.0s
CANCELED[workspace 52/116] RUN if [ true = true ]; then mkdir -p /home/laradock/.nvm && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/ 228.0s

does anyone know what is the cause? I use laravel and laradock.

2

Answers


  1. Chosen as BEST ANSWER

    i get this message when i run curl command:

    $ curl --retry 5 --max-time 30 -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 15916  100 15916    0     0  88978      0 --:--:-- --:--:-- --:--:-- 89920
    => nvm is already installed in /c/Users/ovy79/.nvm, trying to update using git
    => => Compressing and cleaning up git repository
    
    => Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.zshrc, and ~/.profile.
    => Create one of them and run this script again
       OR
    => Append the following lines to the correct file yourself:
    
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    
    npm error code ENOENT
    npm error syscall lstat
    npm error path C:Usersovy79AppDataRoamingnpm
    npm error errno -4058
    npm error enoent ENOENT: no such file or directory, lstat 'C:Usersovy79AppDataRoamingnpm'
    npm error enoent This is related to npm not being able to find a file.
    npm error enoent
    npm error A complete log of this run can be found in: C:Usersovy79AppDataLocalnpm-cache_logs2024-10-23T08_54_20_113Z-debug-0.log
    => Close and reopen your terminal to start using nvm or run the following to use it now:
    
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    

  2. I think it might be a network issue. I suggest checking network connectivity from the host where you are building your containers:

    curl -I https://raw.githubusercontent.com/nvm-sh/nvm/
    
    

    Also, it always a good idea to add some retry logic to the curl command, like this:

    curl --retry 5 --max-time 30 -o- https://raw.githubusercontent.com/nvm-sh/nvm/
    

    and when you will rebuild your images, you can add more verbose logging, by add --verbose option, like this:

    docker-compose --verbose build nginx php-fpm workspace mysql redis redis-webui adminer
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search