Merge "Add path of bash files in HATools into setup.py"
[yardstick.git] / Dockerfile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 FROM ubuntu:14.04
11 MAINTAINER Hans Feldt <hans.feldt@ericsson.com>
12
13 # TODO: Is there some easy way to get the fastest/closest mirror?
14 #RUN sed -i 's/archive.ubuntu.com/ftp.acc.umu.se/g' /etc/apt/sources.list
15
16 RUN apt-get update && apt-get install -y \
17     libffi-dev \
18     libssl-dev \
19     libxml2-dev \
20     libxslt1-dev \
21     python \
22     python-dev \
23     python-setuptools && \
24     easy_install -U setuptools
25
26 COPY . /tmp/yardstick
27
28 RUN cd /tmp/yardstick && \
29     python setup.py install && \
30     apt-get -y remove \
31         binutils \
32         cpp \
33         gcc \
34         libffi-dev \
35         libssl-dev \
36         python3 \
37         python-dev && \
38     apt-get -y autoremove && \
39     apt-get clean && \
40     useradd -u 65500 -m yardstick && \
41     cp -a samples /home/yardstick && \
42     chown -R yardstick /home/yardstick/samples && \
43     chgrp -R yardstick /home/yardstick/samples && \
44     rm -rf /tmp/* && \
45     rm -rf /var/lib/apt/lists/*
46
47 USER yardstick
48 CMD bash --login
49 ENV HOME /home/yardstick
50 WORKDIR /home/yardstick