<commit_before>#
# Builder stage
#
FROM ubuntu:19.10 as builder

RUN apt-get update && \
  apt-get install -y \
  openssl ruby ruby-dev git zlib1g-dev cmake build-essential g++ imagemagick

RUN gem install bundler && gem update --system

WORKDIR /opt/builds

COPY . .

RUN bundle install

RUN mkdir /sites && \
  bundle exec jekyll build -d sites/public/developers -c _config.yml,_config-web.yml && \
  bundle exec jekyll build -d sites/enterprise/developers -c _config.yml,_config-enterprise.yml,_config-web.yml

#
# Final stage: use the build artifacts from builder stage
#
FROM node:10.14-slim

WORKDIR /opt/src/app

COPY --from=builder /opt/builds/sites ./sites<commit_msg>FRONTEND-1657 Add synapse build step to dockerfile.<commit_after>
#
# Build Synapse dist/ files
#
FROM node:10.14 as style-builder

WORKDIR /app
COPY ./synapse .

# Install dependencies
RUN npm ci

# Build files
RUN npm run build

#
# Builder stage
#
FROM ubuntu:19.10 as builder

RUN apt-get update && \
  apt-get install -y \
  openssl ruby ruby-dev git zlib1g-dev cmake build-essential g++ imagemagick

RUN gem install bundler && gem update --system

WORKDIR /opt/builds

COPY . .

RUN bundle install

#
# Build Dev Center sites
#
# Copy Synapse dist/ files
COPY --from=style-builder /app/dist ./synapse/dist

RUN mkdir /sites && \
  bundle exec jekyll build -d sites/public/developers -c _config.yml,_config-web.yml && \
  bundle exec jekyll build -d sites/enterprise/developers -c _config.yml,_config-enterprise.yml,_config-web.yml

#
# Final stage: use the build artifacts from builder stage
#
FROM node:10.14-slim

WORKDIR /opt/src/app

COPY --from=builder /opt/builds/sites ./sites
{'fraction_non_alphanumeric': 0.10384153661464586, 'fraction_numerical': 0.015606242496998799, 'mean_word_length': 3.4811827956989245, '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': '161670', 'n_tokens_mistral': 609, 'n_tokens_neox': 557, 'n_words': 182}