summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 59dbef0ba4ebc645bcff50f6778c1141f8309ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
##############################################################################
# Copyright (c) 2015 Ericsson AB and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

FROM ubuntu:14.04
MAINTAINER Hans Feldt <hans.feldt@ericsson.com>

# TODO: Is there some easy way to get the fastest/closest mirror?
#RUN sed -i 's/archive.ubuntu.com/ftp.acc.umu.se/g' /etc/apt/sources.list

RUN apt-get update && apt-get install -y \
    libffi-dev \
    libssl-dev \
    libxml2-dev \
    libxslt1-dev \
    python \
    python-dev \
    python-setuptools && \
    easy_install -U setuptools

COPY . /tmp/yardstick

RUN cd /tmp/yardstick && \
    python setup.py install && \
    apt-get -y remove \
        binutils \
        cpp \
        gcc \
        libffi-dev \
        libssl-dev \
        python3 \
        python-dev && \
    apt-get -y autoremove && \
    apt-get clean && \
    useradd -u 65500 -m yardstick && \
    cp -a samples /home/yardstick && \
    chown -R yardstick /home/yardstick/samples && \
    chgrp -R yardstick /home/yardstick/samples && \
    rm -rf /tmp/* && \
    rm -rf /var/lib/apt/lists/*

USER yardstick
CMD bash --login
ENV HOME /home/yardstick
WORKDIR /home/yardstick