<commit_before>FROM centos:7
MAINTAINER <NAME> <<EMAIL>>

# Install gosu to drop user and chown shared volumes at runtime
RUN export GOSU_VERSION=1.10 && \
    yum -y install epel-release && \
  	yum -y install wget dpkg && \
  	dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" && \
  	wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" && \
  	wget -O /tmp/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" && \
  	export GNUPGHOME="$(mktemp -d)" && \
  	gpg --keyserver ha.pool.sks-keyservers.net --recv-keys <KEY> && \
  	gpg --batch --verify /tmp/gosu.asc /usr/bin/gosu && \
  	rm -r "$GNUPGHOME" /tmp/gosu.asc && \
  	chmod +x /usr/bin/gosu; \
  	gosu nobody true && \
  	yum -y remove wget dpkg && \
  	yum clean all && \
    unset GOSU_VERSION

WORKDIR /opt

# Install core dependencies
RUN yum -y update && \
    yum makecache fast && \
    yum -y groupinstall "Development Tools" && \
    yum -y install epel-release curl which wget && \
    yum -y install sssd pam-devel openssl-devel pam_radius && \
    yum -y install python3 python3-devel python3-pip && \
    yum -y install openldap-devel mysql-devel

ENV VIRTUAL_ENV=/opt/rcamp_venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

ADD requirements.txt /opt/
RUN pip3 install --upgrade pip && \
    pip3 install -r requirements.txt

RUN git clone -b python3 https://github.com/ResearchComputing/django-ldapdb-test-env
WORKDIR django-ldapdb-test-env
RUN python3 setup.py install
WORKDIR /opt

# Add uwsgi conf
COPY uwsgi.ini /opt/uwsgi.ini

# Add codebase to container
COPY rcamp /opt/rcamp

WORKDIR /opt/rcamp
# Set gosu entrypoint and default command<commit_msg>Force rebuild with new django-ldapdb<commit_after>FROM centos:7
MAINTAINER <NAME> <<EMAIL>>

# Install gosu to drop user and chown shared volumes at runtime
RUN export GOSU_VERSION=1.10 && \
    yum -y install epel-release && \
  	yum -y install wget dpkg && \
  	dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" && \
  	wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" && \
  	wget -O /tmp/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" && \
  	export GNUPGHOME="$(mktemp -d)" && \
  	gpg --keyserver ha.pool.sks-keyservers.net --recv-keys <KEY> && \
  	gpg --batch --verify /tmp/gosu.asc /usr/bin/gosu && \
  	rm -r "$GNUPGHOME" /tmp/gosu.asc && \
  	chmod +x /usr/bin/gosu; \
  	gosu nobody true && \
  	yum -y remove wget dpkg && \
  	yum clean all && \
    unset GOSU_VERSION

WORKDIR /opt

# Install core dependencies
RUN yum -y update && \
    yum makecache fast && \
    yum -y groupinstall "Development Tools" && \
    yum -y install epel-release curl which wget && \
    yum -y install sssd pam-devel openssl-devel pam_radius && \
    yum -y install python3 python3-devel python3-pip && \
    yum -y install openldap-devel mysql-devel

ENV VIRTUAL_ENV=/opt/rcamp_venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

ADD requirements.txt /opt/
RUN pip3 install --upgrade pip && \
    pip3 install -r requirements.txt

RUN pwd
RUN git clone -b python3 https://github.com/ResearchComputing/django-ldapdb-test-env
WORKDIR django-ldapdb-test-env
RUN python3 setup.py install
WORKDIR /opt

# Add uwsgi conf
COPY uwsgi.ini /opt/uwsgi.ini

# Add codebase to container
COPY rcamp /opt/rcamp

WORKDIR /opt/rcamp
# Set gosu entrypoint and default command
{'fraction_non_alphanumeric': 0.13335212855934592, 'fraction_numerical': 0.0067662813645334085, 'mean_word_length': 3.0318181818181817, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4454351', 'n_tokens_mistral': 1384, 'n_tokens_neox': 1322, 'n_words': 351}