Skip to content

Commit 4a2997a

Browse files
authored
nginx: Update command to generate host config file (#2411)
Currently, instructions to copy the default configuration from the nginx container to the host uses three commands. This can be done more efficiently with one command (assuming the presence of "cat" in the container which should be a safe). Update the instructions to use the single command.
1 parent 41cc58a commit 4a2997a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

nginx/content.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ You can mount your configuration file, or build a new image with it.
4242
If you wish to adapt the default configuration, use something like the following to get it from a running nginx container:
4343

4444
```console
45-
$ docker run --name tmp-nginx-container -d %%IMAGE%%
46-
$ docker cp tmp-nginx-container:/etc/nginx/nginx.conf /host/path/nginx.conf
47-
$ docker rm -f tmp-nginx-container
45+
$ docker run --rm --entrypoint=cat %%IMAGE%% /etc/nginx/nginx.conf > /host/path/nginx.conf
4846
```
4947

5048
And then edit `/host/path/nginx.conf` in your host file system.

0 commit comments

Comments
 (0)