<commit_before>FROM nginx:1.13-alpine

RUN apk update && apk add --no-cache --virtual .build-deps \
	wget \
	inotify-tools

ENV WORKDIR /www
WORKDIR $WORKDIR

COPY entrypoint /usr/bin
COPY docker-healthcheck /usr/local/bin

RUN mkdir -p nginx/default
COPY ./conf/sites-available/core nginx/default/auto.conf

RUN chmod +x /usr/bin/entrypoint \
	&& chmod +x /usr/local/bin/docker-healthcheck \
	&& mkdir -p $WORKDIR/nginx \
	&& rm -Rf /etc/nginx

COPY ./conf /etc/nginx

# # forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
 	&& ln -sf /dev/stderr /var/log/nginx/error.log

HEALTHCHECK --interval=10s --timeout=3s \
    CMD ["docker-healthcheck"]

ENTRYPOINT entrypoint<commit_msg>Added certificate generation layer in Dockerfile<commit_after>FROM nginx:1.13-alpine

RUN apk update && apk add --no-cache --virtual .build-deps \
	wget \
	inotify-tools

ENV WORKDIR /www
WORKDIR $WORKDIR

COPY entrypoint /usr/bin
COPY docker-healthcheck /usr/local/bin

RUN chmod +x /usr/bin/entrypoint \
	&& chmod +x /usr/local/bin/docker-healthcheck \
	&& mkdir -p $WORKDIR/nginx \
	&& rm -Rf /etc/nginx

COPY ./conf /etc/nginx

# # forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
 	&& ln -sf /dev/stderr /var/log/nginx/error.log

## Adding self-signed SSL
RUN apk update && apk add openssl && \
	mkdir -p /etc/nginx/cert && \
	openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
		-keyout /etc/nginx/cert/nginx.key \
		-out /etc/nginx/cert/nginx.crt \
		-subj "/C=IT/ST=Parma/L=Parma/O=Caffeina/OU=IT Department/CN=caffeina.com" && \
	openssl dhparam 2048 -out /etc/nginx/cert/dhparam.pem

HEALTHCHECK --interval=10s --timeout=3s \
    CMD ["docker-healthcheck"]

ENTRYPOINT entrypoint
{'fraction_non_alphanumeric': 0.13773796192609183, 'fraction_numerical': 0.014557670772676373, 'mean_word_length': 3.1175115207373274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7113977', 'n_tokens_mistral': 735, 'n_tokens_neox': 674, 'n_words': 171}