<commit_before>FROM alpine:3.5

LABEL maintainer='amaya <<EMAIL>>'

ARG REPOSITORY='https://github.com/Chinachu/Chinachu.git'
ARG BRANCH='gamma'

ENV CHINACHU_HOME='/usr/local/chinachu'
ENV SCRIPT_DIR='/usr/local/bin'
ENV RECORDED_DIR="$CHINACHU_HOME/recorded"
ENV DUMP_SITE="$RECORDED_DIR/dump"

WORKDIR $CHINACHU_HOME

COPY service $SCRIPT_DIR

RUN set -eux \
	&& apk add --no-cache \
		bash \
		curl \
		nodejs \
		coreutils \
		procps \
		ca-certificates \
	\
	&& apk add --no-cache --virtual .build-deps \
		git \
		make \
		gcc \
		g++ \
		autoconf \
		automake \
		wget \
		tar \
		xz \
		libc-dev \
		musl-dev \
		eudev-dev \
		libevent-dev \
		jq \
	&& git clone -b $BRANCH --single-branch $REPOSITORY $CHINACHU_HOME \
	&& cd $CHINACHU_HOME \
	&& echo 1 | ./chinachu installer \
	&& mkdir turnout \
	&& cat config.sample.json | \
		jq ".mirakurunPath = \"http://mirakurun:40772/\" | .recordedDir = \"$RECORDED_DIR\" |.storageLowSpaceAction = \"none\" | .storageLowSpaceCommand = \"$SCRIPT_DIR/storage_low_space_command\" | .recordedCommand = \"$SCRIPT_DIR/recorded_command\"" \
		> turnout/config.json \
	&& echo [] > turnout/rules.json \
	&& rm *.sample.json \
	&& ./chinachu service operator initscript > /etc/init.d/chinachu-operator \
	&& ./chinachu service wui initscript > /etc/init.d/chinachu-wui \
	&& chmod +x /etc/init.d/* \
	\
	&& apk del --purge .build-deps \
	&& npm cache clean \<commit_msg>:bug: Fix `recordedDir`<commit_after>FROM alpine:3.5

LABEL maintainer='amaya <<EMAIL>>'

ARG REPOSITORY='https://github.com/Chinachu/Chinachu.git'
ARG BRANCH='gamma'

ENV CHINACHU_HOME='/usr/local/chinachu'
ENV SCRIPT_DIR='/usr/local/bin'
ENV RECORDED_DIR="$CHINACHU_HOME/recorded"
ENV DUMP_SITE="$RECORDED_DIR/dump"

WORKDIR $CHINACHU_HOME

COPY service $SCRIPT_DIR

RUN set -eux \
	&& apk add --no-cache \
		bash \
		curl \
		nodejs \
		coreutils \
		procps \
		ca-certificates \
	\
	&& apk add --no-cache --virtual .build-deps \
		git \
		make \
		gcc \
		g++ \
		autoconf \
		automake \
		wget \
		tar \
		xz \
		libc-dev \
		musl-dev \
		eudev-dev \
		libevent-dev \
		jq \
	&& git clone -b $BRANCH --single-branch $REPOSITORY $CHINACHU_HOME \
	&& cd $CHINACHU_HOME \
	&& echo 1 | ./chinachu installer \
	&& mkdir turnout \
	&& cat config.sample.json | \
		jq ".mirakurunPath = \"http://mirakurun:40772/\" | .recordedDir = \"$RECORDED_DIR/\" | .storageLowSpaceAction = \"none\" | .storageLowSpaceCommand = \"$SCRIPT_DIR/storage_low_space_command\" | .recordedCommand = \"$SCRIPT_DIR/recorded_command\"" \
		> turnout/config.json \
	&& echo [] > turnout/rules.json \
	&& rm *.sample.json \
	&& ./chinachu service operator initscript > /etc/init.d/chinachu-operator \
	&& ./chinachu service wui initscript > /etc/init.d/chinachu-wui \
	&& chmod +x /etc/init.d/* \
	\
	&& apk del --purge .build-deps \
	&& npm cache clean \
{'fraction_non_alphanumeric': 0.16443661971830986, 'fraction_numerical': 0.005633802816901409, 'mean_word_length': 2.8653061224489798, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '1733649', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1148, 'n_words': 214}