Skip to content

Instantly share code, notes, and snippets.

@girishaiocdawacs
Created November 26, 2020 01:03
Show Gist options
  • Save girishaiocdawacs/26bb4fc2332ba27d6a2dd8da86d562e8 to your computer and use it in GitHub Desktop.
Save girishaiocdawacs/26bb4fc2332ba27d6a2dd8da86d562e8 to your computer and use it in GitHub Desktop.
Dockerfile nginx qa
root@bastion-1:~/java# cat awacs-nginx/Dockerfile.nginx.qa
FROM nginx
RUN mkdir /etc/nginx/certs/
RUN rm /etc/nginx/conf.d/default.conf
RUN touch /etc/nginx/conf.d/default.conf
COPY certificate.crt /etc/nginx/certs/
COPY private.key /etc/nginx/certs
COPY ca_bundle.crt /etc/nginx/certs/
# clear existing certificated if there are any
RUN rm -rf /etc/nginx/qa.awacscloud.tech.*
# concat ca_bundle
RUN for file in /etc/nginx/certs/certificate.crt /etc/nginx/certs/ca_bundle.crt; do cat $file >> /etc/nginx/qa.awacscloud.tech.crt; echo >> /etc/nginx/qa.awacscloud.tech.crt; done
COPY private.key /etc/nginx/qa.awacscloud.tech.key
COPY awacs-nginx.conf /etc/nginx/conf.d/
VOLUME /usr/share/nginx/html
VOLUME /etc/nginx
root@bastion-1:~/java#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment