docker exec -it redis "docker exec" requires at least 2 arguments. See 'docker exec --help'. Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] Run a command in a running container
时间: 2023-08-19 17:22:01 浏览: 286
It seems like you are trying to execute a command inside a Redis container using the "docker exec" command, but you are missing some arguments.
The correct syntax for the "docker exec" command is:
```
docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
```
Where "OPTIONS" are optional flags that you can use to customize the behavior of the command, "CONTAINER" is the name or ID of the container you want to execute the command in, "COMMAND" is the command you want to execute inside the container, and "ARG..." are optional arguments for the command.
For example, if you want to execute the "redis-cli" command inside a Redis container named "my-redis", you can use the following command:
```
docker exec -it my-redis redis-cli
```
This will start an interactive session inside the "my-redis" container, running the "redis-cli" command.
阅读全文