<commit_before># ====================
# --- Build Assets ---
# ====================
FROM node:10-alpine AS assets

RUN apk update && \
    apk add yarn g++ make python --no-cache && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /var/wiki

WORKDIR /var/wiki

COPY ./package.json /var/wiki/package.json
COPY ./client /var/wiki/client

RUN yarn
RUN yarn build
RUN rm -rf /var/wiki/node_modules
RUN yarn --production

# ===============
# --- Release ---
# ===============
FROM node:10-alpine
LABEL maintainer="<EMAIL>"

RUN apk update && \
    apk add bash curl git openssh supervisor --no-cache && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /var/wiki

WORKDIR /var/wiki

COPY ./dev/build/supervisord.conf /etc/supervisord.conf
COPY --from=assets /var/wiki/assets ./assets
COPY --from=assets /var/wiki/node_modules ./node_modules
COPY ./server /var/wiki/server
COPY ./config.sample.yml /var/wiki/config.yml
COPY ./package.json /var/wiki/package.json
COPY ./LICENSE /var/wiki/LICENSE<commit_msg>fix: multi-stage dockerfile<commit_after># ====================
# --- Build Assets ---
# ====================
FROM node:10-alpine AS assets

RUN apk update && \
    apk add yarn g++ make python --no-cache && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /var/wiki

WORKDIR /var/wiki

COPY ./package.json ./package.json
COPY ./dev ./dev
COPY ./client ./client

RUN yarn
RUN yarn build
RUN rm -rf /var/wiki/node_modules
RUN yarn --production

# ===============
# --- Release ---
# ===============
FROM node:10-alpine
LABEL maintainer="<EMAIL>"

RUN apk update && \
    apk add bash curl git openssh supervisor --no-cache && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /var/wiki

WORKDIR /var/wiki

COPY ./dev/build/supervisord.conf /etc/supervisord.conf
COPY --from=assets /var/wiki/assets ./assets
COPY --from=assets /var/wiki/node_modules ./node_modules
COPY --from=assets /var/wiki/server ./server
COPY ./server ./server
COPY ./config.sample.yml ./config.yml
COPY ./package.json ./package.json
COPY ./LICENSE ./LICENSE
{'fraction_non_alphanumeric': 0.2166172106824926, 'fraction_numerical': 0.003956478733926805, 'mean_word_length': 2.8169811320754716, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '727046', 'n_tokens_mistral': 720, 'n_tokens_neox': 656, 'n_words': 188}