avast / gradle-docker-compose-plugin

Simplifies usage of Docker Compose for integration testing in Gradle environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed testComposeBuild: unknown shorthand flag: 'p' in -p

ricardosilvaperes opened this issue · comments

Hi, having something similar to #414, but for the publish/export port option. Happening after upgrade to 0.17.4.

[2023-08-10T11:13:28.950Z] > Task :testComposeBuild FAILED
[2023-08-10T11:13:28.950Z] unknown shorthand flag: 'p' in -p
[2023-08-10T11:13:28.950Z] See 'docker --help'.
[2023-08-10T11:13:28.950Z] 
[2023-08-10T11:13:28.950Z] Usage:  docker [OPTIONS] COMMAND
[2023-08-10T11:13:28.950Z] 
[2023-08-10T11:13:28.950Z] A self-sufficient runtime for containers
[2023-08-10T11:13:28.950Z] 
[2023-08-10T11:13:28.950Z] Options:
[2023-08-10T11:13:28.950Z]       --config string      Location of client config files (default
[2023-08-10T11:13:28.950Z]                            "/home/jenkins/.docker")
[2023-08-10T11:13:28.950Z]   -c, --context string     Name of the context to use to connect to the
[2023-08-10T11:13:28.950Z]                            daemon (overrides DOCKER_HOST env var and
[2023-08-10T11:13:28.950Z]                            default context set with "docker context use")
[2023-08-10T11:13:28.950Z]   -D, --debug              Enable debug mode
[2023-08-10T11:13:28.950Z]   -H, --host list          Daemon socket(s) to connect to
[2023-08-10T11:13:28.950Z]   -l, --log-level string   Set the logging level
[2023-08-10T11:13:28.950Z]                            ("debug"|"info"|"warn"|"error"|"fatal")
[2023-08-10T11:13:28.950Z]                            (default "info")
[2023-08-10T11:13:28.950Z]       --tls                Use TLS; implied by --tlsverify
[2023-08-10T11:13:28.950Z]       --tlscacert string   Trust certs signed only by this CA (default
[2023-08-10T11:13:28.950Z]                            "/home/jenkins/.docker/ca.pem")
[2023-08-10T11:13:28.950Z]       --tlscert string     Path to TLS certificate file (default
[2023-08-10T11:13:28.950Z]                            "/home/jenkins/.docker/cert.pem")
[2023-08-10T11:13:28.950Z]       --tlskey string      Path to TLS key file (default
[2023-08-10T11:13:28.950Z]                            "/home/jenkins/.docker/key.pem")
[2023-08-10T11:13:28.950Z]       --tlsverify          Use TLS and verify the remote
[2023-08-10T11:13:28.950Z]   -v, --version            Print version information and quit
[2023-08-10T11:13:28.950Z] 
[2023-08-10T11:13:28.950Z] Management Commands:
[2023-08-10T11:13:28.950Z]   builder     Manage builds
[2023-08-10T11:13:28.950Z]   config      Manage Docker configs
[2023-08-10T11:13:28.950Z]   container   Manage containers
[2023-08-10T11:13:28.950Z]   context     Manage contexts
[2023-08-10T11:13:28.950Z]   image       Manage images
[2023-08-10T11:13:28.950Z]   manifest    Manage Docker image manifests and manifest lists
[2023-08-10T11:13:28.950Z]   network     Manage networks
[2023-08-10T11:13:28.950Z]   node        Manage Swarm nodes
[2023-08-10T11:13:28.950Z]   plugin      Manage plugins
[2023-08-10T11:13:28.950Z]   secret      Manage Docker secrets
[2023-08-10T11:13:28.950Z]   service     Manage services
[2023-08-10T11:13:28.950Z]   stack       Manage Docker stacks
[2023-08-10T11:13:28.950Z]   swarm       Manage Swarm
[2023-08-10T11:13:28.950Z]   system      Manage Docker
[2023-08-10T11:13:28.950Z]   trust       Manage trust on Docker images
[2023-08-10T11:13:28.950Z]   volume      Manage volumes
[2023-08-10T11:13:28.950Z] 
[2023-08-10T11:13:28.950Z] Commands:
[2023-08-10T11:13:28.950Z]   attach      Attach local standard input, output, and error streams to a running container
[2023-08-10T11:13:28.950Z]   build       Build an image from a Dockerfile
[2023-08-10T11:13:28.950Z]   commit      Create a new image from a container's changes
[2023-08-10T11:13:28.950Z]   cp          Copy files/folders between a container and the local filesystem
[2023-08-10T11:13:28.950Z]   create      Create a new container
[2023-08-10T11:13:28.950Z]   diff        Inspect changes to files or directories on a container's filesystem
[2023-08-10T11:13:28.950Z]   events      Get real time events from the server
[2023-08-10T11:13:28.950Z]   exec        Run a command in a running container
[2023-08-10T11:13:28.950Z]   export      Export a container's filesystem as a tar archive
[2023-08-10T11:13:28.950Z]   history     Show the history of an image
[2023-08-10T11:13:28.950Z]   images      List images
[2023-08-10T11:13:28.950Z]   import      Import the contents from a tarball to create a filesystem image
[2023-08-10T11:13:28.950Z]   info        Display system-wide information
[2023-08-10T11:13:28.950Z]   inspect     Return low-level information on Docker objects
[2023-08-10T11:13:28.951Z]   kill        Kill one or more running containers
[2023-08-10T11:13:28.951Z]   load        Load an image from a tar archive or STDIN
[2023-08-10T11:13:28.951Z]   login       Log in to a Docker registry
[2023-08-10T11:13:28.951Z]   logout      Log out from a Docker registry
[2023-08-10T11:13:28.951Z]   logs        Fetch the logs of a container
[2023-08-10T11:13:28.951Z]   pause       Pause all processes within one or more containers
[2023-08-10T11:13:28.951Z]   port        List port mappings or a specific mapping for the container
[2023-08-10T11:13:28.951Z]   ps          List containers
[2023-08-10T11:13:28.951Z]   pull        Pull an image or a repository from a registry
[2023-08-10T11:13:28.951Z]   push        Push an image or a repository to a registry
[2023-08-10T11:13:28.951Z]   rename      Rename a container
[2023-08-10T11:13:28.951Z]   restart     Restart one or more containers
[2023-08-10T11:13:28.951Z]   rm          Remove one or more containers
[2023-08-10T11:13:28.951Z]   rmi         Remove one or more images
[2023-08-10T11:13:28.951Z]   run         Run a command in a new container
[2023-08-10T11:13:28.951Z]   save        Save one or more images to a tar archive (streamed to STDOUT by default)
[2023-08-10T11:13:28.951Z]   search      Search the Docker Hub for images
[2023-08-10T11:13:28.951Z]   start       Start one or more stopped containers
[2023-08-10T11:13:28.951Z]   stats       Display a live stream of container(s) resource usage statistics
[2023-08-10T11:13:28.951Z]   stop        Stop one or more running containers
[2023-08-10T11:13:28.951Z]   tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
[2023-08-10T11:13:28.951Z]   top         Display the running processes of a container
[2023-08-10T11:13:28.951Z]   unpause     Unpause all processes within one or more containers
[2023-08-10T11:13:28.951Z]   update      Update configuration of one or more containers
[2023-08-10T11:13:28.951Z]   version     Show the Docker version information
[2023-08-10T11:13:28.951Z]   wait        Block until one or more containers stop, then print their exit codes
[2023-08-10T11:13:28.951Z] 
[2023-08-10T11:13:28.951Z] Run 'docker COMMAND --help' for more information on a command.
[2023-08-10T11:13:28.951Z] 
[2023-08-10T11:13:28.951Z] To get more help with docker, check out our guides at https://docs.docker.com/go/guides/

Hello, did you please catch that since 0.17.0, the plugin defaults to the Docker Compose V2?
https://github.com/avast/gradle-docker-compose-plugin/releases/tag/0.17.0
This looks like you don't have Compose plugin installed in your Docker.

I see. Will double check. Thanks for your quick reply.

Hi @augi Is it mandatory to install Compose plugin to make it work?