Created
March 26, 2025 02:24
-
-
Save jbrz0/bd640d879df69305d16a4c6fb74dfc57 to your computer and use it in GitHub Desktop.
Docker container restart cursorrule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker Container Restart Rule | |
Description: | |
This rule directs the AI to provide guidance for restarting Docker containers instead of suggesting direct docker commands. When a container restart is needed, the AI must indicate which container (based on the Dockerfile context) should be restarted and leave the manual execution to the user. Additionally, the AI should verify context to avoid incorrect suggestions such as "npm run dev" when the service is actually running inside a Docker container. | |
Guidelines: | |
Restart Relevant Docker Containers: | |
Analyze the Dockerfile to determine which container(s) are relevant for the current service. | |
Instruct the user: “Please restart the [container name] Docker container manually” (or similar), without providing a direct docker command. | |
No Direct Docker Command Execution: | |
Never output docker commands (e.g., “docker restart …”). | |
Ensure that all container management instructions are purely advisory and require manual action by the user. | |
Context-Aware Verification: | |
Check the context to decide whether suggesting “npm run dev” (or other local commands) is appropriate. | |
If the service is running inside Docker, avoid local development command suggestions and instruct a container restart instead. | |
If uncertain about the runtime environment, ask for clarification instead of making assumptions. | |
Non-Interference with Other Operations: | |
This rule applies only to Docker-related guidance. Other commands (like file modifications or non-Docker commands) should not be affected. | |
Error Handling: | |
If the AI is unsure whether a service is containerized, it should flag the uncertainty and ask for more context rather than suggesting an inappropriate command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment