Dockerfile 4.28 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
FROM ubuntu:18.04

Yann Garcia's avatar
Yann Garcia committed
3
MAINTAINER ETSI STF 569
Yann Garcia's avatar
Yann Garcia committed
4

Yann Garcia's avatar
Yann Garcia committed
5
LABEL description="STF569 Docker Image"
Yann Garcia's avatar
Yann Garcia committed
6
7

ENV TERM=xterm
Yann Garcia's avatar
Yann Garcia committed
8
ENV HOSTNAME docker-titan-STF569
Yann Garcia's avatar
Yann Garcia committed
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \
    && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \
      autoconf \
      bison \
      build-essential \
      cmake \
      curl \
      dos2unix \
      doxygen \
      emacs \
      expect \
      flex \
      g++-8 \
      gcc-8 \
      gdb \
      git-core \
      gnutls-bin \
      graphviz \
      inetutils-ping \
      libglib2.0-dev \
      libpcap-dev \
      libgcrypt-dev \
      libncurses5-dev \
      libssl-dev \
      libtool-bin \
      libtool \
      libwireshark-dev \
      libxml2-dev \
      lsof \
      ntp \
      openssh-server \
      pkg-config \
      qt5-default \
      qttools5-dev \
      qtmultimedia5-dev \
      libqt5svg5-dev \
      subversion \
      sudo \
      sshpass \
      tcpdump \
      texlive-font-utils \
      tshark \
      tzdata \
      valgrind \
      vim \
      vsftpd \
      xutils-dev \
      tree \
      unzip \
      wget \
      xsltproc \
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean \
    && rm -rf /var/lib/apt/lists/*

Yann Garcia's avatar
Yann Garcia committed
69
RUN echo "docker-titan-STF569" > /etc/hostname \
Yann Garcia's avatar
Yann Garcia committed
70
71
72
73
74
75
76
77
78
    && echo "root:etsi" | chpasswd

RUN useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \
    && echo "etsi:etsi" | chpasswd \
    && adduser etsi sudo

RUN  cd /home/etsi \
    && echo "" >> /home/etsi/.bashrc \
    && echo "export HOME=/home/etsi" >> /home/etsi/.bashrc \
Yann Garcia's avatar
Yann Garcia committed
79
    && echo "export LD_LIBRARY_PATH=/home/etsi/dev/etsi_mec/lib:$LD_LIBRARY_PATH" >> /home/etsi/.bashrc \
Yann Garcia's avatar
Yann Garcia committed
80
81
82
83
84
85
86
87
88
89
    && echo "export PATH=/home/etsi/bin:$PATH" >> /home/etsi/.bashrc \
    && echo "cd /home/etsi" >> /home/etsi/.bashrc \
    && echo ". ./devenv.bash" >> /home/etsi/.bashrc \
    && . /home/etsi/.bashrc \
    && mkdir -p bin lib include tmp frameworks docs man dev \
    && chown etsi:etsi bin lib include tmp frameworks docs man dev \
    && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Seems that COPY does not work as expected, to be investaged
#==> Fallback to more secured solution
Yann Garcia's avatar
Yann Garcia committed
90
#COPY [^.]* /home/etsi/dev/STF569_Mec/
Yann Garcia's avatar
Yann Garcia committed
91
#COPY home home/etsi
YannGarcia's avatar
YannGarcia committed
92
RUN git clone https://forge.etsi.org/gitlab/mec/gs032p3-ttcn-test-suite.git /home/etsi/dev/STF569_Mec
Yann Garcia's avatar
Yann Garcia committed
93
RUN chown -R etsi /home/etsi/dev/STF569_Mec/ && cd /home/etsi/dev/STF569_Mec
Yann Garcia's avatar
Yann Garcia committed
94
95
96
97
98
99
100
101
102
103
104

USER etsi
 
RUN cd /home/etsi/frameworks \
    && git clone https://git.savannah.gnu.org/git/osip.git ./osip \
    && cd osip \
    && ./autogen.sh \
    && ./configure --prefix=/home/etsi \
    && make && make install

RUN cd /home/etsi/frameworks \
105
106
107
    && wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz' \
    && tar -zxvf ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
    && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
Yann Garcia's avatar
Yann Garcia committed
108
109
    && cd /home/etsi/dev/STF569_Mec \
    && cd /home/etsi/dev/STF569_Mec/ttcn \
Yann Garcia's avatar
Yann Garcia committed
110
111
112
113
    && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
    && git clone https://forge.etsi.org/gitlab/LIBS/LibIms.git ./LibIms \
    && git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon \
    && git clone -bSTF525 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts \
Yann Garcia's avatar
Yann Garcia committed
114
    && cd /home/etsi/dev/STF569_Mec/ttcn/LibIts \
Yann Garcia's avatar
Yann Garcia committed
115
116
    && rm -fr asn1 t3q xsd \
    && cd ttcn && rm -fr BTP CALM CAM Common DCC DENM GeoNetworking Ipv6OverGeoNetworking IVIM MapemSpatem Pki Security SremSsem V2G \
Yann Garcia's avatar
Yann Garcia committed
117
    && cd /home/etsi/dev/STF569_Mec/scripts \
Yann Garcia's avatar
Yann Garcia committed
118
119
    && chmod 775 *.bash devenv.bash.* \
    && cd /home/etsi \
Yann Garcia's avatar
Yann Garcia committed
120
    && ln -sf /home/etsi/dev/STF569_Mec/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash \
Yann Garcia's avatar
Yann Garcia committed
121
122
123
    && ls -ltr /home/etsi \
    && export HOME=/home/etsi \
    && . /home/etsi/devenv.bash \
Yann Garcia's avatar
Yann Garcia committed
124
    && cd /home/etsi/dev/STF569_Mec/scripts \
Yann Garcia's avatar
Yann Garcia committed
125
126
    && ./build_titan.bash \
    && . /home/etsi/devenv.bash \
Yann Garcia's avatar
Yann Garcia committed
127
128
129
    && ./update_mec_project.bash \
    && cd /home/etsi/dev/etsi_mec/src/AtsMec/objs \
    && ../bin/mec_generate_makefile.bash
Yann Garcia's avatar
Yann Garcia committed
130
131

# That's all Floks