Fix link to requirements in Nginx recipe (#3969)

This commit is contained in:
Peter Kokot 2017-07-27 01:23:00 +02:00 committed by Misty Stanley-Jones
parent c6f6c44e56
commit a59d321e8d

View file

@ -67,24 +67,17 @@ properly. For more information, see
## Setting things up ## 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
-- ```bash
mkdir -p auth data
Create the required directories
```
mkdir -p auth
mkdir -p 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`:
``` ```conf
cat > auth/nginx.conf << 'EOF'
events { events {
worker_connections 1024; 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".
``` ```bash
docker run --rm --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/nginx.htpasswd $ 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.
``` ```bash
cp domain.crt auth $ cp domain.crt auth
cp domain.key 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`.
``` ```yaml
cat <<EOF > docker-compose.yml
nginx: nginx:
image: "nginx:1.9" image: "nginx:1.9"
ports: ports:
@ -184,7 +175,6 @@ registry:
- 127.0.0.1:5000:5000 - 127.0.0.1:5000:5000
volumes: volumes:
- `pwd`./data:/var/lib/registry - `pwd`./data:/var/lib/registry
EOF
``` ```
## Starting and stopping ## Starting and stopping