Skip to content

Commit 0ce1731

Browse files
authored
Merge pull request rust-lang#451 from jyn514/master
Improve README wrt docker
2 parents 624a39d + 162baa8 commit 0ce1731

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ without adding new users and packages to your host machine.
5656

5757
Make sure you have docker-compose and are able to download ~10GB data on the first run.
5858

59-
6059
```sh
6160
git clone https://github.com/rust-lang/docs.rs.git docs.rs
6261
cd docs.rs
@@ -68,14 +67,31 @@ If you need to store big files in the repository's directory it's recommended to
6867
put them in the `ignored/` subdirectory, which is ignored both by git and
6968
Docker.
7069

70+
### Docker-Compose
71+
72+
#### Rebuilding Containers
73+
74+
To rebuild the site, run `docker-compose build`.
75+
Note that docker-compose caches the build even if you change the source code,
76+
so this will be necessary anytime you make changes.
77+
78+
#### FAQ
79+
80+
##### I keep getting the error `standard_init_linux.go:211: exec user process caused "no such file or directory"` when I use docker-compose.
81+
82+
You probably have [CRLF line endings](https://en.wikipedia.org/wiki/CRLF).
83+
This causes the hashbang in the docker-entrypoint to be `/bin/sh\r` instead of `/bin/sh`.
84+
This is probably because you have `git.autocrlf` set to true,
85+
[set it to `input`](https://stackoverflow.com/questions/10418975) instead.
86+
7187
### CLI
7288

7389
#### Starting web server
7490

7591
```sh
7692
# This command will start web interface of docs.rs and you can access it from
7793
# http://localhost:3000/`
78-
docker-compose run web -p 3000:3000 start-web-server
94+
docker-compose run -p 3000:3000 web start-web-server
7995
```
8096

8197
#### `build` subcommand
@@ -114,7 +130,7 @@ docker-compose run -d db
114130
docker exec -it <the container name goes here> psql -U cratesfyi
115131
```
116132

117-
#### Contact
133+
### Contact
118134

119135
Docs.rs is run and maintained by [Rustdoc team](https://www.rust-lang.org/governance/teams/dev-tools#rustdoc).
120136
You can find us in #docs-rs on [Discord](https://discord.gg/rust-lang).

0 commit comments

Comments
 (0)