Changes between Version 4 and Version 5 of NGINX HowTo Install Using Docker
- Timestamp:
- 10/05/16 15:58:46 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NGINX HowTo Install Using Docker
v4 v5 6 6 7 7 {{{$ sudo apt-get install git }}} 8 9 '''Step 2 - Install Docker''' 10 11 [[Docker HowTo Install]] 8 12 9 13 == Install NGINX using Docker … … 21 25 This will create a directory /local/docker/<USER>/docker_nginx_ssl 22 26 27 3. Move to this directory 23 28 29 {{{cd /local/docker/<USER>/docker_nginx_ssl/}}} 24 30 31 4. Ensure you have the directory /share on your host machine. Copy nginx.conf to /share 25 32 33 {{{cp nginx.conf /share}}} 26 34 35 5. Create a directory /share/cert/live ensure the files .cer .csr .key already exist 27 36 37 5. Configure /share/nginx.conf as necessary to include files and other application forwards. 28 38 39 6. Build container 29 40 30 /share/cert/live 41 {{{sudo docker build -t lcbruit/nginx_ssl:v1.1 .}}} 42 43 sudo docker run -d -p 80:80 -p 443:443 -e 'DH_SIZE=512' -v /share:/etc/nginx/external/ lcbruit/nginx_ssl:v1.1 44 45 7. To build the image : 31 46 32 47 sudo docker build -t lcbruit/nginx_ssl:v1.1 . 33 48 34 sudo docker run -d -p 80:80 -p 443:443 -e 'DH_SIZE=512' -v /share:/etc/nginx/external/ lcbruit/nginx_ssl:v1.1 49 8. To run the docker container : 35 50 36 To build the image : 51 {{{sudo docker run -d -p 80:80 -p 443:443 -e 'DH_SIZE=512' -v /share:/etc/nginx/external/ lcbruit/nginx_ssl:v1.1}}} 37 52 38 sudo docker build -t lcbruit/nginx_ssl:v1.1 . 53 9. Test Nginx : 39 54 40 To run the docker container : 41 42 sudo docker run -d -p 80:80 -p 443:443 -e 'DH_SIZE=512' -v /share:/etc/nginx/external/ lcbruit/nginx_ssl:v1.1 43 44 Ensure you have the directory /share on your host machine. 45 46 Copy nginx.conf to /share 47 48 Create a directory /share/cert/live ensure the files .cer .csr .key already exist 49 50 Configure /share/nginx.conf as necessary to include files and other application forwards. 51 52 Test Nginx : 53 54 http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk 55 {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk}}} 55 56 56 57 === Further Info === … … 58 59 NGINX acts as a reverse proxy and directs client requests to the appropriate back-end applications 59 60 61 For example 60 62 docker_redcap_upgrade Port 82 61 63 docker_appointments Port 81