<commit_before>FROM mhart/alpine-node:7.5

# File Author / Maintainer
MAINTAINER <NAME>

RUN apk update && \
	apk upgrade && \
	apk add --no-cache build-base && \
	apk add --no-cache python

RUN addgroup -S openhabcloud && \
	adduser -H -S -g openhabcloud openhabcloud
    
# Add proper timezone
RUN apk add --no-cache tzdata && \
	cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
	echo "Europe/Berlin" >  /etc/timezone

# Cleanup container
RUN rm -rf \
    /usr/share/man \
    /tmp/* /var/cache/apk/* \
    /root/.npm \
    /root/.node-gyp \
    /root/.gnupg \
    /usr/lib/node_modules/npm/man \
    /usr/lib/node_modules/npm/doc \
    /usr/lib/node_modules/npm/html \
    /usr/lib/node_modules/npm/scripts

# We going to use changes to package.json to force Docker not to use the cache
# when we change our app nodejs dependencies:
COPY ./package.json ./config.json /tmp/

RUN cd /tmp && npm install
RUN mkdir -p /opt/openhabcloud && cp -a /tmp/node_modules /opt/openhabcloud

# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
WORKDIR /opt/openhabcloud

USER openhabcloud

ADD . /opt/openhabcloud

EXPOSE 3000

CMD ["node", "/opt/openhabcloud/app.js"]<commit_msg>Fixes Docker image problem w. bcrypt & security issue by updating node to 7.10.1 (#124)<commit_after>FROM mhart/alpine-node:7.10.1

# File Author / Maintainer
MAINTAINER <NAME>

RUN apk update && \
	apk upgrade && \
	apk add --no-cache build-base && \
	apk add --no-cache python

RUN addgroup -S openhabcloud && \
	adduser -H -S -g openhabcloud openhabcloud
    
# Add proper timezone
RUN apk add --no-cache tzdata && \
	cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
	echo "Europe/Berlin" >  /etc/timezone

# Cleanup container
RUN rm -rf \
    /usr/share/man \
    /tmp/* /var/cache/apk/* \
    /root/.npm \
    /root/.node-gyp \
    /root/.gnupg \
    /usr/lib/node_modules/npm/man \
    /usr/lib/node_modules/npm/doc \
    /usr/lib/node_modules/npm/html \
    /usr/lib/node_modules/npm/scripts

# We going to use changes to package.json to force Docker not to use the cache
# when we change our app nodejs dependencies:
COPY ./package.json ./config.json /tmp/

RUN cd /tmp && npm install && npm rebuild bcrypt --build-from-source
RUN mkdir -p /opt/openhabcloud && cp -a /tmp/node_modules /opt/openhabcloud

# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
WORKDIR /opt/openhabcloud

USER openhabcloud

ADD . /opt/openhabcloud

EXPOSE 3000

CMD ["node", "/opt/openhabcloud/app.js"]
{'fraction_non_alphanumeric': 0.12400152149106124, 'fraction_numerical': 0.00798782807151008, 'mean_word_length': 2.8115942028985508, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7211100', 'n_tokens_mistral': 962, 'n_tokens_neox': 907, 'n_words': 276}