| 3 | | /local/docker/<USER>/ |
| | 3 | '''Step 1 - Install Git''' |
| | 4 | |
| | 5 | {{{$ sudo apt-get update }}} |
| | 6 | |
| | 7 | {{{$ sudo apt-get install git }}} |
| | 8 | |
| | 9 | == Install NGINX using Docker |
| | 10 | |
| | 11 | 1. On the host machine go to directory |
| | 12 | |
| | 13 | {{{/local/docker/<USER>/}}} |
| | 14 | |
| | 15 | 2. Go to this directory and checkout from docker_nginx_ssl |
| | 16 | |
| | 17 | {{{sudo git clone https://github.com/LCBRU/docker_nginx_ssl.git}}} |
| | 18 | |
| | 19 | {{{sudo chmod -R 777 docker_nginx_ssl/}}} |
| | 20 | |
| | 21 | This will create a directory /local/docker/<USER>/docker_nginx_ssl |
| | 22 | |
| | 23 | |
| | 24 | |
| | 25 | |
| | 26 | |
| | 27 | |
| | 28 | |
| | 36 | To build the image : |
| | 37 | |
| | 38 | sudo docker build -t lcbruit/nginx_ssl:v1.1 . |
| | 39 | |
| | 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 |