Dockerfile 1.3 KB
Newer Older
Michele Carignani's avatar
Michele Carignani committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
FROM ubuntu:16.04

MAINTAINER ETSI STF 569

LABEL description="SFT569 Robot Framework Docker Image"

ENV TERM=xterm
ENV HOSTNAME docker-robot-STF569


ARG ssh_prv_key



RUN DEBIAN_FRONTEND=noninteractive apt update \
16
	&& apt install python3  git -y \
Michele Carignani's avatar
Michele Carignani committed
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
	&& apt install python3-pip -y \
        && apt install openssh-server -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean \
    && rm -rf /var/lib/apt/lists/*


RUN echo "docker-robot-STF569" > /etc/hostname \
    && echo "root:etsi" | chpasswd

RUN useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \
    && echo "etsi:etsi" | chpasswd \
    && adduser etsi sudo \
    && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers


RUN DEBIAN_FRONTEND=noninteractive \
        && mkdir -p /home/etsi/dev/robot \
        && cd /home/etsi/dev/robot 


ADD . /home/etsi/dev/robot

RUN pip3 install robotframework

RUN DEBIAN_FRONTEND=noninteractive \
	&& cd /home/etsi/dev/robot \
	&& pip3 install -r requirements.txt \
45 46 47 48 49
	&& chmod +x /home/etsi/dev/robot/scripts/* \
	&& git clone https://github.com/etsi-cti-admin/robotframework-mockserver \
	&& cd  robotframework-mockserver \
	&& patch -p1 < ../extensions/mockserverlibrary.patch \
	&& python3 -m pip install -e .
Michele Carignani's avatar
Michele Carignani committed
50 51 52 53

CMD tail -f /dev/null