Add exceptions for patch 48515
[releng-anteater.git] / docker / Dockerfile
1 ##############################################################################
2 # Anteater Dockerfile
3 ##############################################################################
4 # Copyright (c) 2017 Luke Hinds <lhinds@redhat.com>, Red Hat
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 FROM centos:latest
13 MAINTAINER Luke Hinds <lhinds@redhat.com>
14 LABEL version="0.1" description="Anteater - OPNFV Gerrit Security Gate Checks"
15
16 # environment variables
17 ARG BRANCH=master
18 ARG ANTEATER_USER=opnfv
19
20 # Anteater is run as user 'opnfv'
21 RUN useradd -U -m -s /bin/bash ${ANTEATER_USER}
22
23 ENV HOME /home/${ANTEATER_USER}
24 ENV ANTEATER_HOME ${HOME}/anteater
25
26 # Packaged dependencies
27 RUN yum -y install epel-release
28 RUN yum -y update
29 RUN yum -y install git python-devel python-pip python-virtualenv
30 RUN yum clean all
31
32 # Run all following commands and container as non-root user
33 USER ${ANTEATER_USER}
34
35 # Commands to clone and install
36 RUN mkdir -p ${ANTEATER_HOME}
37 RUN git clone https://gerrit.opnfv.org/gerrit/releng-anteater ${ANTEATER_HOME}
38 WORKDIR ${ANTEATER_HOME}
39 RUN virtualenv ~/venv
40 RUN . ~/venv/bin/activate
41 RUN ~/venv/bin/pip install -r ${ANTEATER_HOME}/requirements.txt
42 RUN ~/venv/bin/python ${ANTEATER_HOME}/setup.py install