You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
Currently when attempting to run bring services up with libcompose, on the second attempt the Up command fails with Volume "node_modules" needs to be recreated - driver has changed.
returnfmt.Errorf("Volume %q needs to be recreated - driver has changed", v.name)
}
It is assumed that there will be a known configured value for config.VolumeConfig.Driver, however, if no configuration is passed to this function, then no default value is provided (it remains an empty string):
Changing the volumes section does indeed fix the issue...
...
volumes:
node_modules:
driver: localyarn_cache:
driver: local
...
...however, this is not desirable. Since it is very common to not require the volume driver to be specified directly in the docker-compose.yaml then it makes sense to only check for a change in driver only when comparing against a non-empty value.
Another solution to this would be to add a default to the config.VolumeConfig.Driver to the value of local somewhere here:
@xZero707 this is the repository for libcompose, a go-implementation of a library for handling compose-files; I think you might be looking for the docker compose issue tracker; https://github.com/docker/compose/issues
@thaJeztah I'm sure it's libcompose as I encountered error inside portainer/portainer container which utilized libcompose for stack deployment.
I agree, however that docker-compose from pip has nothing to do with libcompose. Sorry about the confusion I've created.
docker-compose on the host is not even used in a containers.
Currently when attempting to run bring services up with libcompose, on the second attempt the
Up
command fails withVolume "node_modules" needs to be recreated - driver has changed
.The example docker compose file:
The issue looks to be here:
libcompose/docker/volume/volume.go
Lines 63 to 65 in 6bb86d5
It is assumed that there will be a known configured value for
config.VolumeConfig.Driver
, however, if no configuration is passed to this function, then no default value is provided (it remains an empty string):libcompose/docker/volume/volume.go
Lines 88 to 93 in 6bb86d5
Changing the volumes section does indeed fix the issue...
...however, this is not desirable. Since it is very common to not require the volume driver to be specified directly in the
docker-compose.yaml
then it makes sense to only check for a change in driver only when comparing against a non-empty value.Another solution to this would be to add a default to the
config.VolumeConfig.Driver
to the value oflocal
somewhere here:libcompose/project/project.go
Line 318 in a86fb3c
The text was updated successfully, but these errors were encountered: