Laradock: Cannot build php-fpm

Created on 28 Dec 2016  路  31Comments  路  Source: laradock/laradock

When try run docker-compose up or docker-compose up nginx mysql redis with some parameter the result it's same. I have this error..
Building php-fpm
ERROR: Unknown instruction: DOCKER-PHP-EXT-INSTALL

And can't fixed this. Any idea?

Bug

Most helpful comment

Ok, I've just got it working, although I'm still not sure on the exact cause, what I did:

1) git checkout f82d3b30b483abdac72b0554ff7d72218c45fa34
2) docker-compose up -d nginx mysql redis (this should build now)
3) docker-compose stop
4) git checkout master
5) docker-compose up -d nginx mysql redis

Someone with a bit more knowledge can probably understand why this works, it might be running an old image now, I don't know, but it starts :)

All 31 comments

+1 Same issue. Just tried to install your docker environment from scratch and got that error.

This problem is laradock docker image need to update.

docker-compose pull
docker-compose build --no--cache

Nope, didn't help.
After updating and executing docker-compose build --no-cache
there is same error: Unknown instruction: DOCKER-PHP-EXT-INSTALL

Here is the latest lines from log:

Removing intermediate container 7d0b31de191e
Step 71/71 : WORKDIR /var/www
---> 1322108cdad2
Removing intermediate container 78b4afc65c03
Successfully built 1322108cdad2
Building php-fpm
ERROR: Unknown instruction: DOCKER-PHP-EXT-INSTALL

docker images | grep "laradock/"

laradock/workspace                                             1.2                 c486cc00e710        7 weeks ago         707 MB
laradock/php-fpm                                               7.0--1.2            ee574fa56381        4 months ago        410 MB
laradock/php-fpm                                               5.6--1.2            c5d737fd42b0        4 months ago        397 MB
laradock/workspace                                             1.1                 a3f8d1f74013        4 months ago        696 MB
laradock/php-fpm                                               7.0--1.1            0a29c8c254a6        4 months ago        410 MB
laradock/workspace                                             1.0                 fa59baa68a65        5 months ago        694 MB

docker pull laradock/php-fpm:7.0--1.2

docker images | grep "laradock/"
returns:
laradock/workspace 1.3 4973a22e69b6 7 days ago 709 MB

and

docker pull laradock/php-fpm 7.0--1.2
returns:

"docker pull" requires exactly 1 argument(s).
See 'docker pull --help'.

Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Pull an image or a repository from a registry

docker pull laradock/php-fpm:7.0--1.2

I can sure it will be work.

i can sure it will be work.

yes. it works. laradock/php-fpm was updated, however docker-compose up -d nginx mysql redis and docker-compose build --no-cache still returns same error.

A few days ago I also encountered this problem and solved, but I think I missed what step, I have to look back and determine the correct and then back to you later.

Ok, thanks for help!

docker rmi laradock/php-fpm:7.0--1.2

docker-compose build --pull php-fpm

Building php-fpm
ERROR: Unknown instruction: DOCKER-PHP-EXT-INSTALL

In there, i think it's a cache problem, i has been delete laradock/php-fpm:7.0--1.2, but it still returns "Unknown instruction", so i modify file /laradock/php-fpm/Dockerfile-70 line 13 to FROM laradock/php-fpm:7.0--1.2s, and i exec this:

docker-compose build --pull php-fpm

Building php-fpm
Step 1/31 : FROM laradock/php-fpm:7.0--1.2s
^CERROR: Aborting.

laradock/php-fpm:7.0--1.2s is a wrong image tag, so this is expected results锛宼hen i modify laradock/php-fpm:7.0--1.2s back to laradock/php-fpm:7.0--1.2 and exec this:

docker-compose build --pull php-fpm

Building php-fpm
Step 1/31 : FROM laradock/php-fpm:7.0--1.2

it work for me, and now i can't reproduce the bug, please try it.

if it still return error, try remove your all images or reset your docker, i think it is a finally way.

When I i modified file /laradock/php-fpm/Dockerfile-70 line 13 to FROM laradock/php-fpm:7.0--1.2s I got the same error when run docker-compose build --pull php-fpm:

>docker-compose build --pull php-fpm
Building php-fpm
ERROR: Unknown instruction: DOCKER-PHP-EXT-INSTALL

And it didn't download anything.

You said that laradock image need to be updated. But first time I installed laradock was 28 of Dec. Shouldn't it be already up to date? I think if I remove all my images and reinstall it I'll get the same state as i had 28 of Dec.

Yesterday,i used a new win10 pc to first install laradock, it is worked; And i found this error when my mac update laradock version, after updated laradock images, it has been fixed.

please show me docker images | grep "laradock/" return.

>docker images | grep "laradock/"
laradock/workspace 1.3 4973a22e69b6 8 days ago 709 MB

you miss laradock/php-fpm

exec docker pull laradock/php-fpm:7.0--1.2, and make sure it's done.

Done. Now it's:
>docker images | grep "laradock/"
laradock/workspace 1.3 4973a22e69b6 8 days ago 709 MB
laradock/php-fpm 7.0--1.2 ee574fa56381 4 months ago 410 MB

docker-compose build --no-cache php-fpm

docker-compose build --no-cache php-fpm
Building php-fpm
ERROR: Unknown instruction: DOCKER-PHP-EXT-INSTALL

馃槩 Ok, maybe my way no use to you, maybe you can try modified php-fpm dockerfile again.

Finally if you have no idea , try reset docker and update docker/docker-compose version, sorry for can't help you.

Yep, thank you for help!

Any luck with this @alexweb? I'm getting the same issue as you.

I've also tried deleting all of my Docker images and rebuilding, still no dice.

Nope. Don't know how to fix this

Ok, I've just got it working, although I'm still not sure on the exact cause, what I did:

1) git checkout f82d3b30b483abdac72b0554ff7d72218c45fa34
2) docker-compose up -d nginx mysql redis (this should build now)
3) docker-compose stop
4) git checkout master
5) docker-compose up -d nginx mysql redis

Someone with a bit more knowledge can probably understand why this works, it might be running an old image now, I don't know, but it starts :)

It works! Thanks!

And one more question (not sure if it's related to the issue):
Can't login to workspace:
> docker-compose exec workspace bash
ERROR: No container found for workspace_1

When I run:
docker-compose ps
I got:
laradock_applications_1 /true Exit 0
laradock_mysql_1 docker-entrypoint.sh mysql ... Up 0.0.0.0:3306->3306/tcp
laradock_nginx_1 nginx Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
laradock_php-fpm_1 php-fpm Up 9000/tcp
laradock_phpmyadmin_1 /run.sh phpmyadmin Up 0.0.0.0:8080->80/tcp
laradock_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
laradock_workspace_1 /bin/sh -c #(nop) WORKDIR ... Exit 0
Restarting workspace didn't help.
Any ideas?

Same here 馃憥 , looks like it's not as easy as that after all.

@alexweb For can't login to workspace:

  1. add command: "/sbin/my_init" to workspace Container in docker-compose.yml
  2. docker-compose down
  3. docker-compose up -d xxxx
  4. docker-compose exec workspace bash

It's work for me. BTW, command: "/sbin/my_init" is from laradock/workspace 1.1 tag.

@alexweb hao do you fixed the problem? i have a same problem.

Building php-fpm
Unknown instruction: DOCKER-PHP-EXT-INSTALL

Same problem here, I'm on Windows 10. Error says: "docker-php-ext-install command not found".

While I run the command:
docker-compose build php-fpm now I got this:

Building php-fpm
Step 1/91 : ARG LARADOCK_PHP_VERSION
ERROR: Service 'php-fpm' failed to build: Please provide a source image with from prior to commit

Any idea how to resolve this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielsdeboer picture danielsdeboer  路  3Comments

szyzak picture szyzak  路  3Comments

Mahmoudz picture Mahmoudz  路  3Comments

StarFleetCPTN picture StarFleetCPTN  路  3Comments

SamAriafar picture SamAriafar  路  3Comments