laradock icon indicating copy to clipboard operation
laradock copied to clipboard

Service 'workspace' failed to build - Unable to build php-fpm / nginx

Open getafixx opened this issue 1 year ago • 4 comments

Description:

Error on building php-fpm (any version) but 8.1 is what I want Same error if I try nginx

Expected Behavior:

That I can run a build correctly

docker-compose up -d php-fpm

or

docker-compose up -d nginx 

or

docker-compose up -d php-fpm nginx mysql 

Context information:

Output of git rev-parse HEAD

6c8cb6dd85eb1fcad6f7dce3e9d6c6a29c6e3ed8

Output of docker version

Client:
 Version:           20.10.22+azure-1
 API version:       1.41
 Go version:        go1.18.9
 Git commit:        3a2c30b63ab20acfcc3f3550ea756a0561655a77
 Built:             Thu Dec 15 15:37:38 UTC 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.22+azure-1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.9
  Git commit:       42c8b314993e5eb3cc2776da0bbe41d5eb4b707b
  Built:            Thu Dec 15 22:17:04 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.16+azure-1
  GitCommit:        2e3140a0e09d288a9086474752b4478aa0964e7c
 runc:
  Version:          1.1.4
  GitCommit:        5fd4c4d144137e991c4acebb2146ab1483a97925
 docker-init:
  Version:          0.19.0
  GitCommit:    

Output of docker-compose version

docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

System info: Mac, Windows or Linux. Include which disto/version

Linux Debian GNU/Linux 11 (bullseye) ( 5.10.102.1-microsoft-standard-WSL2 x86_64)
within a VC code dev container.

Steps to reproduce the issue:

  1. cd /workspaces/code/
  2. composer create-project laravel/laravel laravel10
  3. git clone [email protected]:laradock/laradock.git laradock
  4. Copy .env.example into .env and set PHP_VERSION to 8.1

Stacktrace & Additional info:


[vscode@798c74cb1f3a:/workspaces/code/laradock] (master)$ docker-compose up -d --build php-fpm
Building workspace
[+] Building 3.3s (4/4) FINISHED                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                             0.0s
 => => transferring dockerfile: 39B                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => ERROR [internal] load metadata for docker.io/laradock/workspace:latest-8.2.1                                                                 3.1s
 => [auth] laradock/workspace:pull token for registry-1.docker.io                                                                                0.0s
------
 > [internal] load metadata for docker.io/laradock/workspace:latest-8.2.1:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: docker.io/laradock/workspace:latest-8.2.1: not found
ERROR: Service 'workspace' failed to build : Build failed
[vscode@798c74cb1f3a:/workspaces/code/laradock] (master)$ 

amd

[vscode@798c74cb1f3a:/workspaces/code/laradock] (master)$ docker-compose up -d --build nginx
Building workspace
[+] Building 0.8s (3/3) FINISHED                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                             0.0s
 => => transferring dockerfile: 39B                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => ERROR [internal] load metadata for docker.io/laradock/workspace:latest-8.2.1                                                                 0.6s
------
 > [internal] load metadata for docker.io/laradock/workspace:latest-8.2.1:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: docker.io/laradock/workspace:latest-8.2.1: not found
ERROR: Service 'workspace' failed to build : Build failed
[vscode@798c74cb1f3a:/workspaces/code/laradock] (master)$ 

getafixx avatar Mar 01 '23 16:03 getafixx

From your log, it seems that it tried to pull an image from docker.io/laradock/workspace:latest-8.2.1, which is not exist.

You may want docker.io/laradock/workspace:latest-8.1 instead.

I know you have set it correctly, but try to re-checking your PHP version in .env. It should be;

PHP_VERSION=8.1

And not

PHP_VERSION=8.2.1

naruaika avatar Apr 15 '23 08:04 naruaika

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

stale[bot] avatar Aug 12 '23 06:08 stale[bot]

I have PHP_VERSION=8.1 but still not working

ninoshainidze avatar Aug 31 '23 14:08 ninoshainidze

try docker compose build --no-cache --pull php-fpm workspace

bestlong avatar Sep 01 '23 06:09 bestlong