<commit_before>FROM alpine:edge

# User/Group
ENV MY_USER="accuser" \
	MY_GROUP="accuser" \
	MY_UID="1000" \
	MY_GID="1000"

RUN set -xe \
    echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
    && apk update \
    && apk add --no-cache --update \
    bash \
    less \
    vim \
    sudo \
    nano \
    php7 \
    php7-fpm \
    php7-cli \
    php7-json \
    php7-zlib \
    php7-xml \
    php7-xmlreader \
    php7-xmlwriter \
    php7-pdo \
    php7-phar \
    php7-openssl \
    php7-pdo_mysql \
    php7-mysqli \
    php7-session \
    php7-gd \
    php7-iconv \
    php7-mcrypt \
    php7-curl \
    php7-opcache \
    php7-ctype \
    php7-apcu \
    php7-intl \
    php7-bcmath \
    php7-mbstring \
    php7-dom \
    php7-xmlreader \
    php7-gettext \
    php7-tokenizer \
    php7-zip \
    openssh-client \
    git \
    curl \
    wget \
    rsync \
    musl \
    tar \
    autoconf \
    automake \
    binutils \
    binutils-libs \
    build-base \
    file \
    fortify-headers \
    g++ \
    gcc \
    gdbm \
    gmp \
    sqlite-libs \
    yaml \
    zlib-dev \
    gmp-dev \
    http-parser \
    isl \
    libatomic \
    libc-dev \
    libffi \
    libgmpxx \
    libgomp \
    libintl \
    libjpeg-turbo-utils \
    libmagic \
    libuv \
    m4 \
    make \
    mpc1 \
    mpfr3 \
    musl-dev \
    nasm \
    nodejs \
    openssh-keygen \
    perl \
    pkgconf \
    python2 \
    sqlite-libs \
    sqlite-dev \
    yaml \
    mysql-client \
    zlib-dev && \
    sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
    ln -sf /usr/bin/php7 /usr/bin/php

## ADD PHP to the path
ENV PATH=$PATH:/usr/bin/php

COPY www.conf /etc/php7/php-fpm.conf

## Add normal user with passwordless sudo
RUN addgroup -S ${MY_GROUP} \
    && adduser -S -s /bin/bash -h /home/accuser -G ${MY_GROUP} ${MY_USER} \
    && echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
    && echo 'accuser:secret' | chpasswd


## Run the following as the privileged user
USER accuser

## Install composer
RUN cd /home/accuser
RUN curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

## Install wp-cli
RUN cd /home/accuser \
    && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
    && chmod +x wp-cli.phar \
    && sudo mv wp-cli.phar /usr/local/bin/wp \
    && wp --info

CMD "echo 'Codeception server started'"<commit_msg>remove user creation out of docker image (will be moved to entry script if this works in local testing)<commit_after>FROM alpine:edge

RUN set -xe \
    echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
    && apk update \
    && apk add --no-cache --update \
    bash \
    less \
    vim \
    sudo \
    nano \
    php7 \
    php7-fpm \
    php7-cli \
    php7-json \
    php7-zlib \
    php7-xml \
    php7-xmlreader \
    php7-xmlwriter \
    php7-pdo \
    php7-phar \
    php7-openssl \
    php7-pdo_mysql \
    php7-mysqli \
    php7-session \
    php7-gd \
    php7-iconv \
    php7-mcrypt \
    php7-curl \
    php7-opcache \
    php7-ctype \
    php7-apcu \
    php7-intl \
    php7-bcmath \
    php7-mbstring \
    php7-dom \
    php7-xmlreader \
    php7-gettext \
    php7-tokenizer \
    php7-zip \
    openssh-client \
    git \
    curl \
    wget \
    rsync \
    musl \
    tar \
    autoconf \
    automake \
    binutils \
    binutils-libs \
    build-base \
    file \
    fortify-headers \
    g++ \
    gcc \
    gdbm \
    gmp \
    sqlite-libs \
    yaml \
    zlib-dev \
    gmp-dev \
    http-parser \
    isl \
    libatomic \
    libc-dev \
    libffi \
    libgmpxx \
    libgomp \
    libintl \
    libjpeg-turbo-utils \
    libmagic \
    libuv \
    m4 \
    make \
    mpc1 \
    mpfr3 \
    musl-dev \
    nasm \
    nodejs \
    openssh-keygen \
    perl \
    pkgconf \
    python2 \
    sqlite-libs \
    sqlite-dev \
    yaml \
    mysql-client \
    zlib-dev && \
    sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
    ln -sf /usr/bin/php7 /usr/bin/php

## ADD PHP to the path
ENV PATH=$PATH:/usr/bin/php

COPY www.conf /etc/php7/php-fpm.conf

CMD "echo 'Codeception server started'"
{'fraction_non_alphanumeric': 0.12854797091250295, 'fraction_numerical': 0.02017358667604973, 'mean_word_length': 1.4892002335084646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '5970011', 'n_tokens_mistral': 1845, 'n_tokens_neox': 1711, 'n_words': 331}