Docker Community Forums

Share and learn in the Docker community.

Downgrading docker-compose.yml to support a lower Compose version


Hi there.

Firstly, apologies if the tag is inaccurate – It seems like both a swarm and compose related issue, so I chose swarm.

I am currently working from a pretty restricted corporate environment.

I am attempting to run a docker stack deploy command on a docker-compose.yml file, but it is currently giving a:

$ docker stack deploy -c ./docker-compose.yml my_test_stack
unsupported Compose file version: 3.3

Looking at the compatibility matrix:

I realised that the issue is due to my company using docker version 1.13.1, which translates to Compose version 3.1. The configs in the docker-compose.yml requires 3.3.

Short of upgrading docker (which is pretty much impossible in my context), I am exploring the option of downgrading the docker-compose.yml file to be version 3.1-compliant.

I would like to seek advice on the best way to do so. My current thought process is to procure a list of features that are supported from 3.2 onwards, and then removing (or translating these somehow) from the the docker-compose.yml file so as to be 3.1-compliant.

However I am not able to get a list easily from the release notes:

May I kindly get some wisdom on this (i.e. potential issues, best way to do so, general thoughts)?

Much appreciated!