Docker Compose files including build steps fail
Issue
In Portainer versions 2.29.2 and greater, deploying a stack that includes a build directive to a remote Docker environment fails with the error:
Unable to upgrade to tcp, received 200
This limitation is under review internally, for now external builds are the most stable option.
Workaround
Currently Portainer does not support executing build steps inside a compose file for remote environments.
To deploy successfully:
Build the image outside Portainer using Docker or a CI pipeline
Push the image to a registry or load it onto the remote host
Update your compose file to reference the built image, removing any build directives
Last updated
Was this helpful?