Fix link to requirements in Nginx recipe (#3969)
This commit is contained in:
parent
c6f6c44e56
commit
a59d321e8d
1 changed files with 91 additions and 101 deletions
|
@ -67,24 +67,17 @@ properly. For more information, see
|
|||
|
||||
## Setting things up
|
||||
|
||||
Read again [the requirements](index.md#requirements).
|
||||
Review the [requirements](../index.md#requirements), then follow ese steps.
|
||||
|
||||
Ready?
|
||||
1. Create the required directories
|
||||
|
||||
--
|
||||
|
||||
Create the required directories
|
||||
|
||||
```
|
||||
mkdir -p auth
|
||||
mkdir -p data
|
||||
```bash
|
||||
mkdir -p auth data
|
||||
```
|
||||
|
||||
Create the main nginx configuration you will use.
|
||||
2. Create the main nginx configuration you will use. Paste this code block into a new file called `auth/nginx.conf`:
|
||||
|
||||
```
|
||||
|
||||
cat > auth/nginx.conf << 'EOF'
|
||||
```conf
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
@ -148,26 +141,24 @@ http {
|
|||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Now create a password file for "testuser" and "testpassword"
|
||||
3. Create a password file `auth/nginx.htpasswd` for "testuser" and "testpassword".
|
||||
|
||||
```
|
||||
docker run --rm --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/nginx.htpasswd
|
||||
```bash
|
||||
$ docker run --rm --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/nginx.htpasswd
|
||||
```
|
||||
|
||||
Copy over your certificate files
|
||||
4. Copy your certificate files to the `auth/` directory.
|
||||
|
||||
```
|
||||
cp domain.crt auth
|
||||
cp domain.key auth
|
||||
```bash
|
||||
$ cp domain.crt auth
|
||||
$ cp domain.key auth
|
||||
```
|
||||
|
||||
Now create your compose file
|
||||
5. Create the compose file. Paste the following YAML into a new file called `docker-compose.yml`.
|
||||
|
||||
```
|
||||
cat <<EOF > docker-compose.yml
|
||||
```yaml
|
||||
nginx:
|
||||
image: "nginx:1.9"
|
||||
ports:
|
||||
|
@ -184,7 +175,6 @@ registry:
|
|||
- 127.0.0.1:5000:5000
|
||||
volumes:
|
||||
- `pwd`./data:/var/lib/registry
|
||||
EOF
|
||||
```
|
||||
|
||||
## Starting and stopping
|
||||
|
|
Loading…
Reference in a new issue