Skip to Content
All posts

Docker Compose Error

 — #WordPress#Docker

Problem

Recently while updating with Skela with webpack, I encountered a weird error where I wasn't able to run a simple script:

bin/composer
#!/bin/bash
docker-compose exec -w /var/www/html/wp-content/themes/skela wordpress composer "$@"

When trying to run this script via ./bin/composer install, I got this error in my terminal:

ERROR: Setting workdir for exec is not supported in API < 1.35 (1.30)

The error was coming from the -w flag in the docker-compose exec command in the composer script.

Solution

Turns The fix was to update the version in my docker-compose.yml file to from version 3.5 to 3.6. It's strange because 3.5 isn't anywhere close to the API version 1.35 from the error message 🤷‍♀️

docker-compose.yml
version: '3.6'services:
  wordpress:
    build: