DELAPARRA
Index
Color
NL
Category: CLI flags

-t, --tag, -t (tty) (Tag / Allocate TTY)

Explained by Updated

What is -t, --tag, -t (tty) (Tag / Allocate TTY)?

-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.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about -t, --tag, -t (tty) (Tag / Allocate TTY)

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.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.