<commit_before>FROM node:9.11

# Folder for our application code
WORKDIR /usr/src/app

# Install dependencies
COPY package.json ./
COPY yarn.lock ./
RUN yarn install --silent

# Copy application code
COPY . .

# Build production assets
RUN yarn build

# Remove dependencies to save space
RUN rm -rf node_modules

# re-install local express so we can run the prod server
RUN npm install express --no-package-lock

# Clean caches
RUN yarn cache clean
RUN npm cache clean --force

# Expose port 8090 for express server
EXPOSE 8090

# Run production server
CMD ["yarn", "prod"]<commit_msg>optimize dockerfile size<commit_after>FROM node:9.11

# Folder for our application code
WORKDIR /usr/src/app

# Copy application
COPY . .

# Install dependencies and run build script
RUN yarn install --silent \
    && yarn build \
    && rm -rf node_modules \
    && yarn cache clean

# re-install local express so we can run the prod server
RUN npm install express --no-package-lock \
    && npm cache clean --force

# Expose port 8090 for express server
EXPOSE 8090

# Run production server
CMD ["yarn", "prod"]
{'fraction_non_alphanumeric': 0.07923497267759563, 'fraction_numerical': 0.020036429872495445, 'mean_word_length': 3.5040983606557377, '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': '39783', 'n_tokens_mistral': 348, 'n_tokens_neox': 317, 'n_words': 142}