Commit 0b58e78e authored by Yann Garcia's avatar Yann Garcia
Browse files

Reorganize ETSI-CTI TITAN docker

parent dd9d3419
Loading
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
#!/bin/bash

set -e
set -vx

#echo "Building titan:binaries"
#cd from-binaries
#docker build --tag titan-bin .

echo "Building titan:binaries"
cd from-sources
./.jenkins.sh

cd -

cd from-binaries
docker build --tag titan-bin .
# That's all Floks
exit 0
+6 −0
Original line number Diff line number Diff line
@@ -2,6 +2,12 @@

Build and run Titan in a Docker environment

## From source
This project build a Titan environment from scratch.
The built container can be used for any ETSI project based on TTCN-3/TITAN development.



## Contact information

Email at cti_support at etsi dot org

from-sources/.jenkins.sh

100644 → 100755
+14 −1
Original line number Diff line number Diff line
#!/bin/bash

echo "Build script to be defined"
 No newline at end of file
set -vx
set -e

cd $(dirname $0)

OLD_PWD=`pwd`

./build.sh
./run.sh

cd ${OLD_PWD}

# That's all Floks
exit 0
+10 −56
Original line number Diff line number Diff line
@@ -7,65 +7,19 @@ MAINTAINER ETSI-CTI

LABEL description="Titan Docker Image"

ENV TERM=linux
ENV HOSTNAME docker-titan
ENV TERM=linux \
    HOSTNAME=docker-STF \
    HOME=/home/etsi

RUN echo "docker-titan" > /etc/hostname
RUN DEBIAN_FRONTEND=noninteractive apt-get update 
RUN DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y 
# RUN DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 
# RUN DEBIAN_FRONTEND=noninteractive apt-get autoclean -y 
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
      autoconf \
      bison \
      build-essential \
      cmake \
      curl \
      doxygen \
      emacs \
      expect \
      flex \
      gdb \ 
      git-core \
      gnutls-bin \
      libglib2.0-dev \
      libpcap-dev \
      libgcrypt-dev \
      libncurses5-dev \
      libssl-dev \
      libxml2-dev \
      pkg-config \
      sudo \
      sshpass \
      unzip \
      wget \
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean -y
USER etsi

ADD scripts/devenv.bash.ubuntu /home/root/devenv.bash
ADD scripts/build_titan.bash /opt/titan-build/dev/build_titan.bash
RUN chmod +x /opt/titan-build/dev/build_titan.bash
COPY home /home/etsi

ADD scripts/titan_repos.txt /opt/titan-build/dev/titan_repos.txt
RUN cd ${HOME} \
    && export PATH=${HOME}/bin:${PATH} \
    && export LD_LIBRARY_PATH=${HOME}/lib:${LD_LIBRARY_PATH} \
    && ls ${HOME}/etc/init.d/*.sh | while read S; do chmod 0750 "$S"; /bin/bash -c "$S" || exit 1; done

RUN mkdir -p /opt/titan-build   
RUN cd /opt/titan-build \
    && mkdir -p bin lib include dev tmp frameworks docs 

RUN cd /home/root \
    && export TITAN_HOME=/home/root \
    && echo "---- RUNNING devenv.bash" \
    && . /home/root/devenv.bash \
    && echo "" >> /home/root/.bashrc \
    && echo "---- RUNNING devenv.bash  and adding it to bashrc" \
    && echo ". ./devenv.bash" >> /home/root/.bashrc \
    && echo "" >> /home/root/.bashrc \
    && echo "----  Compiling" \
    && cd /opt/titan-build/dev \
    && TOP=$(pwd) ./build_titan.bash

RUN . /home/root/devenv.bash

RUN ttcn3_compiler -v
CMD ["/bin/bash"]

# That's all Floks
+86 −0
Original line number Diff line number Diff line
FROM ubuntu:18.04

MAINTAINER ETSI-CTI

LABEL description="STF Docker Ubuntu image"

ENV TERM=linux \
    HOSTNAME=docker-STF

RUN echo "docker-STF-dev" > /etc/hostname \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
    && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \
    && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && ( echo "oracle-java10-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections -v ) \
    && 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 \
      libglib2.0-dev \
      libpcap-dev \
      libgcrypt-dev \
      libncurses5-dev \
      libssl-dev \
      libtool-bin \
      libtool \
      libwireshark-dev \
      libxml2-dev \
      lsof \
      ntp \
      pkg-config \
      qt5-default \
      qtmultimedia5-dev \
      libqt5svg5-dev \
      subversion \
      sudo \
      sshpass \
      tcpdump \
      texlive-font-utils \
      tshark \
      tzdata \
      valgrind \
      vim \
      vsftpd \
      xutils-dev \
      tree \
      unzip \
      wget \
      xsltproc \
      oracle-java10-installer \
      oracle-java10-set-default \
      libxml2-utils \
      net-tools \
      iputils-ping \
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean \
    && useradd --create-home --shell /bin/bash etsi \
    && echo "etsi:etsi" | chpasswd \
    && adduser etsi sudo \
    && echo "" >> /etc/profile \
    && echo 'export HOME=/home/etsi' >> /etc/profile \
    && echo 'export LD_LIBRARY_PATH=${HOME}/lib:$LD_LIBRARY_PATH' >> /etc/profile \
    && echo 'export PATH=${HOME}/bin:$PATH' >> /etc/profile \
    && echo 'cd ${HOME}' >> /etc/profile \
    && echo ". ./devenv.bash" >> /etc/profile \
    && cd /home/etsi \
    && mkdir -p bin lib include tmp frameworks docs man dev src \
    && chown -R etsi:etsi *

CMD ["/bin/bash"]

# That's all Floks
Loading