Skip to content

stacker deploy --target server --dry-run attempts a real docker pull instead of simulating #238

Description

@vsilent

Summary

stacker deploy --target server --dry-run is supposed to "show what would be deployed without executing" (per --help), but for the server target it actually attempts to pull a Docker image locally, and fails hard if that image isn't available — this isn't a simulation, it's a real side-effecting action.

Steps to reproduce

  1. Register a server target: stacker config setup server --ip <IP> --user root --key <path> (saves into stacker.yml's deploy.server).
  2. stacker deploy --target server --dry-run

Observed

Error: Deployment to server failed: Server deployment failed: Unable to find image 'trydirect/install-service:latest' locally
docker: Error response from daemon: failed to resolve reference "docker.io/trydirect/install-service:latest": docker.io/trydirect/install-service:latest: not found

Note trydirect/install-service:latest doesn't currently resolve on Docker Hub at all (docker pull trydirect/install-service:latest → same "not found" error, confirmed independently of this repro).

Expected

--dry-run should not attempt to pull images, contact Docker, or perform any real deployment action — just print the plan (compose file, target, config bundle contents, etc.), consistent with how --dry-run behaves for --target local/--target cloud (both of which just print a plan without side effects in my testing).

Actual

--dry-run for --target server runs a real local orchestration step (apparently pulling/running a trydirect/install-service container to drive the SSH-based deploy) and surfaces a real failure from it.

Interesting side note

Immediately after this failed --dry-run, running the same command without --dry-run succeeded cleanly and didn't hit this image-pull step at all — so whatever --dry-run does differently for the server target isn't just "the same deploy path minus a final apply step", it's a genuinely different (and broken) code path.

Environment

  • stacker CLI 0.3.1 (144d1a6)
  • Reproduced via stacker-projects/caddy in trydirect/stacker-project-examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions