GoogleContainerTools/skaffold · error

docker compose not yet supported by skaffold

Error message

docker compose not yet supported by skaffold

What it means

The Docker deployer does not yet support `docker compose` deployments. If the deployer config sets UseCompose, `deploy` short-circuits and returns this explicit not-implemented error before building the container config.

Source

Thrown at pkg/skaffold/deploy/docker/deploy.go:174

}

// deploy creates a container in the local docker daemon from a build artifact's image.
func (d *Deployer) deploy(ctx context.Context, out io.Writer, artifact graph.Artifact) error {
	if !stringslice.Contains(d.cfg.Images, artifact.ImageName) {
		// TODO(nkubala)[07/20/21]: should we error out in this case?
		olog.Entry(ctx).Warnf("skipping deploy for image %s since it was not built by Skaffold", artifact.ImageName)
		return nil
	}
	if container, found := d.tracker.ContainerForImage(artifact.ImageName); found {
		olog.Entry(ctx).Debugf("removing old container %s for image %s", container.ID, artifact.ImageName)
		if err := d.client.Delete(ctx, out, container.ID); err != nil {
			return fmt.Errorf("failed to remove old container %s for image %s: %w", container.ID, artifact.ImageName, err)
		}
		d.portManager.RelinquishPorts(container.Name)
	}
	if d.cfg.UseCompose {
		// TODO(nkubala): implement
		return fmt.Errorf("docker compose not yet supported by skaffold")
	}

	containerCfg, err := d.containerConfigFromImage(ctx, artifact.Tag)
	if err != nil {
		return err
	}

	containerName := d.getContainerName(ctx, artifact.ImageName)
	opts := dockerutil.ContainerCreateOpts{
		Name:            containerName,
		Network:         d.network,
		ContainerConfig: containerCfg,
	}

	var debugBindings network.PortMap
	if d.debugger != nil {
		debugBindings, err = d.setupDebugging(ctx, out, artifact, containerCfg)
		if err != nil {

View on GitHub (pinned to a1189de023)

Solutions

  1. Remove the compose option from the docker deploy configuration and use standard per-image Docker deploys
  2. Deploy compose files directly with `docker compose up` outside skaffold, or use a different deployer (kustomize/helm for k8s)
  3. Upgrade skaffold and check whether compose support has since been implemented
  4. Track/implement the feature locally if you own the fork (the code marks it TODO)

Example fix

// before (skaffold.yaml)
deploy:
  docker:
    useCompose: true

// after
deploy:
  docker:
    useCompose: false
    images: ["my-image"]
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Deploy.Docker != nil && cfg.Deploy.Docker.UseCompose {
    return errors.New("docker compose deploys are unsupported by skaffold; disable useCompose")
}

Prevention

When it happens

Trigger: Setting the docker deployer option that enables compose (cfg.UseCompose, e.g. via compose-related skaffold.yaml configuration) and running `skaffold deploy/run/dev`.

Common situations: User expects compose-file-based deploys to work; a skaffold feature flag or config field was enabled despite the feature being unimplemented (the source has a TODO).

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/04c9feedac4c9326. Report an issue: GitHub.