-t, --tag, -t (tty) (Tag / Allocate TTY): Labels a build artifact with a name, or allocates a pseudo-terminal for an interactive session. -t means different things in different tools. In docker build -t myapp:1.4 it gives the image a name and version tag. In docker run -it and ssh -t it allocates a terminal, so you can run an interactive program such as a shell or an editor.
How is -t, --tag, -t (tty) (Tag / Allocate TTY) used in practice?
The tag meaning matters for deployments. An image called myapp:latest says nothing about what is inside it. A tag that includes a version or a commit hash tells you exactly which code is running, and lets you roll back to the previous one.
What should you keep in mind with -t, --tag, -t (tty) (Tag / Allocate TTY)?
The terminal meaning matters when a command behaves oddly. Without -t, programs that expect a screen, such as top or an interactive prompt, may refuse to start or print garbled output. In scripts and CI you usually want the opposite, so leave -t off there.
Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.
Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — `docker rm`,
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.