Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Docker Compose V2 not working when building containers from git source (subdir) #1958

Closed
wedla opened this issue Jul 27, 2021 · 1 comment
Closed
Labels
compatibility Compatibility with docker-compose

Comments

@wedla
Copy link

wedla commented Jul 27, 2021

Description
I'm working in a project that integrates some services hosted in gitlab via docker-compose. Some of these containers are built using dockerfiles inside subdirectories, as you can see in the screenshot below:

image

Last week, this was working fine, but I had to update my docker application, and today, when I tried to up the containers, I got the error below:

image

After a lot of research, I wasn't able to find a solution, but verifying the docker dashboard, I just disabled the following feature:

image

When I did it, docker-compose version was back to 1.29.2, build 5becea4c, and I was able to continue my work.

This issue is being opened to help people that are suffering the same problem as me (I lost a full afternoon on this issue), and to ask you to fix this, if possible.

Steps to reproduce the issue:

  1. docker-compose up -d

Describe the results you received:
I received the following error: "failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to load cache key: subdir not supported yet".

Describe the results you expected:
I expected the containers to be built correctly and without issues.

**Output of docker-compose --version: ***

Docker Compose version v2.0.0-beta.6

Output of docker version:

Docker version 20.10.7, build f0df350

Output of docker context show:

default

Output of docker info:

Client:
 Context:    default
 Debug Mode: false  
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  compose: Docker Compose (Docker Inc., v2.0.0-beta.6)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 16
  Running: 15
  Paused: 0
  Stopped: 1
 Images: 61
 Server Version: 20.10.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc version: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.25-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.844GiB
 Name: docker-desktop
 ID: JEJC:6KBM:UPYM:LYQG:HMZX:AEW3:SCR7:RCMW:3J4W:3M7G:CWZQ:I7N4
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 165
  Goroutines: 143
  System Time: 2021-07-27T23:02:25.2645562Z
  EventsListeners: 4
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details (AWS ECS, Azure ACI, local, etc.):

@wedla wedla changed the title Docker Compose V2 not working when building containers from git sources (subdir) Docker Compose V2 not working when building containers from git source (subdir) Jul 27, 2021
@ndeloof ndeloof added the compatibility Compatibility with docker-compose label Jul 28, 2021
@ndeloof
Copy link
Collaborator

ndeloof commented Jul 29, 2021

This is moby/buildkit#1684
afaict this has been fixed by moby/buildkit#2116, but as a recent change you'll need to wait for engine version to be updated on Docker Desktop

@ndeloof ndeloof closed this as completed Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compatibility Compatibility with docker-compose
Projects
None yet
Development

No branches or pull requests

2 participants