Skip to content

Commit e367454

Browse files
authored
Add -it to docker exec (#2148)
Some commands such as `nodes delete` require user interaction and they fail if `-it` is no supplied to `docker exec`. Use `docker exec -it` in documentation examples to also make them work in interactive commands.
1 parent 4f2fb65 commit e367454

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/running-headscale-container.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ not work with alternatives like [Podman](https://podman.io). The Docker image ca
101101
1. Create a user ([tailnet](https://tailscale.com/kb/1136/tailnet/)):
102102

103103
```shell
104-
docker exec headscale \
104+
docker exec -it headscale \
105105
headscale users create myfirstuser
106106
```
107107

@@ -116,7 +116,7 @@ tailscale up --login-server YOUR_HEADSCALE_URL
116116
To register a machine when running `headscale` in a container, take the headscale command and pass it to the container:
117117

118118
```shell
119-
docker exec headscale \
119+
docker exec -it headscale \
120120
headscale nodes register --user myfirstuser --key <YOUR_MACHINE_KEY>
121121
```
122122

@@ -125,7 +125,7 @@ docker exec headscale \
125125
Generate a key using the command line:
126126

127127
```shell
128-
docker exec headscale \
128+
docker exec -it headscale \
129129
headscale preauthkeys create --user myfirstuser --reusable --expiration 24h
130130
```
131131

@@ -161,4 +161,4 @@ You can also execute commands directly, such as `ls /ko-app` in this example:
161161
docker run headscale/headscale:x.x.x-debug ls /ko-app
162162
```
163163

164-
Using `docker exec` allows you to run commands in an existing container.
164+
Using `docker exec -it` allows you to run commands in an existing container.

0 commit comments

Comments
 (0)