Problem
While updating a project with webpack, I encountered a strange error when running a simple Composer script through Docker Compose.
#!/bin/bash
docker-compose exec -w /var/www/html/wp-content/themes/skela wordpress composer "$@"Running ./bin/composer install returned:
ERROR: Setting workdir for exec is not supported in API < 1.35 (1.30)The error was coming from the -w flag in the command.
Solution
Updating the Compose file version from 3.5 to 3.6 resolved the issue.
version: '3.6'
services:
wordpress:
build: .