Skip to content

[BUG] Cannot start stacks. Error: "unknown shorthand flag: 'p' in -p" BASELINE #696

@drakz-AU

Description

@drakz-AU

Description

Hi,

I am unable to start or stop stacks through dockhand because I get this error unknown shorthand flag: 'p' in -p.
This happens when creating a new stack and clicking the "Save & Deploy" button, and when trying to start/stop stacks in the Stacks list.

The same stacks can be started/stopped successfully manually via the command line.

I am running dockhand:latest-baseline (1.0.20) on TrueNAS 25.10.1 which has Docker 28.3.1.

This happens with every stack, even the default nginx:alpine stack.

My docker compose file for dockhand:

services:
  dockhand:
    image: fnsys/dockhand:latest-baseline
    container_name: dockhand
    restart: unless-stopped
    environment:
      - PUID=568  # Your user ID (run: id -u)
      - PGID=568  # Your group ID (run: id -g)
    group_add:
      - "999"  # Docker group GID for socket access  
    ports:
      - 3000:3000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/uberspace/Docker/data/dockhand:/app/data
      - /mnt/uberspace/Docker/stacks:/app/data/stacks

The full log from Logs -> dockhand after
1) Creating a stack and clicking "Save & Deploy" (fails with error)
2) Saving the stack (Successful)
3) Trying to start the stack from the stack list (fails with error)
using the default nginx:alpine stack.

[dockhand] [Stack:test321] [HostPath]     volumes:
[dockhand] [Stack:test321] [HostPath]       - /mnt/uberspace/Docker/stacks/TrueNAS/test321/html:/usr/share/nginx/html:ro
[dockhand] [Stack:test321] [HostPath]     restart: unless-stopped
[dockhand] [Stack:test321] [HostPath] 
[dockhand] [Stack:test321] [HostPath] # Add more services as needed
[dockhand] [Stack:test321] [HostPath] # networks:
[dockhand] [Stack:test321] [HostPath] #   default:
[dockhand] [Stack:test321] [HostPath] #     driver: bridge
[dockhand] [Stack:test321] [HostPath] 
[dockhand] [Stack:test321] [HostPath] ----------------------------------------
[dockhand] [Stack:test321] [HostPath] Using stdin for compose content (paths translated)
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] EXECUTE LOCAL COMPOSE
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] Operation: up
[dockhand] [Stack:test321] Command: docker compose -p test321 -f - up -d --remove-orphans
[dockhand] [Stack:test321] Working directory: /app/data/stacks/TrueNAS/test321
[dockhand] [Stack:test321] Compose file: /app/data/stacks/TrueNAS/test321/compose.yaml
[dockhand] [Stack:test321] DOCKER_HOST: (local socket)
[dockhand] [Stack:test321] DOCKER_API_VERSION: 1.51
[dockhand] [Stack:test321] Force recreate: false
[dockhand] [Stack:test321] Remove volumes: false
[dockhand] [Stack:test321] Service name: (all services)
[dockhand] [Stack:test321] Env vars count: 0
[dockhand] [Stack:test321] Spawning docker compose process...
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] COMPOSE PROCESS COMPLETE
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] Exit code: 125
[dockhand] [Stack:test321] Timed out: false
[dockhand] [Stack:test321] STDERR:
[dockhand] unknown shorthand flag: 'p' in -p
[dockhand] 
[dockhand] Usage:  docker [OPTIONS] COMMAND [ARG...]
[dockhand] 
[dockhand] Run 'docker --help' for more information
[dockhand] 
[dockhand] [Stack:test321] ========================================
[dockhand] [Stack:test321] DEPLOY STACK RESULT
[dockhand] [Stack:test321] ========================================
[dockhand] [Stack:test321] Success: false
[dockhand] [Stack:test321] Error: unknown shorthand flag: 'p' in -p
[dockhand] 
[dockhand] Usage:  docker [OPTIONS] COMMAND [ARG...]
[dockhand] 
[dockhand] Run 'docker --help' for more information
[dockhand] 
[dockhand] [Stack:test321] [HostPath] Translating relative volume paths for Docker host:
[dockhand] [Stack:test321] [HostPath]  ./html -> /mnt/uberspace/Docker/stacks/TrueNAS/test321/html
[dockhand] [Stack:test321] [HostPath] Translated compose content:
[dockhand] [Stack:test321] [HostPath] ----------------------------------------
[dockhand] [Stack:test321] [HostPath] version: "3.8"
[dockhand] [Stack:test321] [HostPath] 
[dockhand] [Stack:test321] [HostPath] services:
[dockhand] [Stack:test321] [HostPath]   app:
[dockhand] [Stack:test321] [HostPath]     image: nginx:alpine
[dockhand] [Stack:test321] [HostPath]     ports:
[dockhand] [Stack:test321] [HostPath]       - "8080:80"
[dockhand] [Stack:test321] [HostPath]     environment:
[dockhand] [Stack:test321] [HostPath]       - APP_ENV=${APP_ENV:-production}
[dockhand] [Stack:test321] [HostPath]     volumes:
[dockhand] [Stack:test321] [HostPath]       - /mnt/uberspace/Docker/stacks/TrueNAS/test321/html:/usr/share/nginx/html:ro
[dockhand] [Stack:test321] [HostPath]     restart: unless-stopped
[dockhand] [Stack:test321] [HostPath] 
[dockhand] [Stack:test321] [HostPath] # Add more services as needed
[dockhand] [Stack:test321] [HostPath] # networks:
[dockhand] [Stack:test321] [HostPath] #   default:
[dockhand] [Stack:test321] [HostPath] #     driver: bridge
[dockhand] [Stack:test321] [HostPath] 
[dockhand] [Stack:test321] [HostPath] ----------------------------------------
[dockhand] [Stack:test321] [HostPath] Using stdin for compose content (paths translated)
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] EXECUTE LOCAL COMPOSE
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] Operation: up
[dockhand] [Stack:test321] Command: docker compose -p test321 -f - up -d --remove-orphans
[dockhand] [Stack:test321] Working directory: /app/data/stacks/TrueNAS/test321
[dockhand] [Stack:test321] Compose file: /app/data/stacks/TrueNAS/test321/compose.yaml
[dockhand] [Stack:test321] DOCKER_HOST: (local socket)
[dockhand] [Stack:test321] DOCKER_API_VERSION: 1.51
[dockhand] [Stack:test321] Force recreate: false
[dockhand] [Stack:test321] Remove volumes: false
[dockhand] [Stack:test321] Service name: (all services)
[dockhand] [Stack:test321] Env vars count: 0
[dockhand] [Stack:test321] Spawning docker compose process...
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] COMPOSE PROCESS COMPLETE
[dockhand] [Stack:test321] ----------------------------------------
[dockhand] [Stack:test321] Exit code: 125
[dockhand] [Stack:test321] Timed out: false
[dockhand] [Stack:test321] STDERR:
[dockhand] unknown shorthand flag: 'p' in -p
[dockhand] 
[dockhand] Usage:  docker [OPTIONS] COMMAND [ARG...]
[dockhand] 
[dockhand] Run 'docker --help' for more information
[dockhand] 
[dockhand] [merged-logs] Request: containers=1, env=1
[dockhand] [merged-logs] Config: type=socket, host=undefined, port=undefined
[dockhand] [merged-logs] Setting up 1 containers in parallel...
[dockhand] [merged-logs] Parallel setup completed in 5ms
[dockhand] [merged-logs] Sources ready: 1, sending connected event
[dockhand] [merged-logs] Starting 1 independent read loops

Steps to reproduce

process included above

Logs

logs included above

Browser logs

Dockhand version

10.0.20-baseline

Hawser version (if used)

No response

Connection mode

socket

Please confirm the following

  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to gofixed, goes to the next release

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions