Skip to content
Dockerfile 3.52 KiB
Newer Older
garciay's avatar
garciay committed
FROM ubuntu:18.04
garciay's avatar
garciay committed

garciay's avatar
garciay committed
MAINTAINER ETSI STF 525
garciay's avatar
garciay committed

LABEL description="STF525 Docker Image"

ENV TERM=linux
ENV HOSTNAME docker-titan-STF525

garciay's avatar
garciay committed
ARG ssh_pub_key
garciay's avatar
garciay committed

garciay's avatar
garciay committed
RUN echo "docker-titan-STF525" > /etc/hostname \
garciay's avatar
garciay committed
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
garciay's avatar
garciay committed
    && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \
garciay's avatar
garciay committed
    && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
garciay's avatar
garciay committed
    && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \
garciay's avatar
garciay committed
      autoconf \
      bison \
      build-essential \
      cmake \
      curl \
garciay's avatar
garciay committed
      dos2unix \
garciay's avatar
garciay committed
      doxygen \
      emacs \
      expect \
      flex \
garciay's avatar
garciay committed
      g++-8 \
      gcc-8 \
garciay's avatar
garciay committed
      gdb \
garciay's avatar
garciay committed
      git-core \
      gnutls-bin \
garciay's avatar
garciay committed
      graphviz \
garciay's avatar
garciay committed
      libglib2.0-dev \
      libpcap-dev \
      libgcrypt-dev \
      libncurses5-dev \
      libssl-dev \
      libtool-bin \
      libtool \
      libwireshark-dev \
      libxml2-dev \
      lsof \
      ntp \
      openssh-server \
garciay's avatar
garciay committed
      pkg-config \
      qt5-default \
      qttools5-dev \
garciay's avatar
garciay committed
      qtmultimedia5-dev \
      libqt5svg5-dev \
      subversion \
      sudo \
      sshpass \
      tcpdump \
      texlive-font-utils \
      tshark \
garciay's avatar
garciay committed
      tzdata \
garciay's avatar
garciay committed
      valgrind \
garciay's avatar
garciay committed
      vim \
garciay's avatar
garciay committed
      vsftpd \
      xutils-dev \ 
      tree \
      unzip \
      wget \
garciay's avatar
garciay committed
      xsltproc \
garciay's avatar
garciay committed
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean \
Yann Garcia's avatar
Yann Garcia committed
    && useradd --create-home --shell /bin/bash --groups sudo,etsi etsi \
garciay's avatar
garciay committed
    && echo "etsi:etsi" | chpasswd \
    && adduser etsi sudo \
    && cd /home/etsi \
garciay's avatar
garciay committed
    && echo "" >> /home/etsi/.bashrc \
    && echo "export HOME=/home/etsi" >> /home/etsi/.bashrc \
    && echo "export LD_LIBRARY_PATH=/home/etsi/dev/etsi_its/lib:$LD_LIBRARY_PATH" >> /home/etsi/.bashrc \
    && 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
garciay's avatar
garciay committed

USER etsi

RUN cd /home/etsi/dev \
Yann Garcia's avatar
Yann Garcia committed
    && git clone -b STF525 --recurse-submodules https://forge.etsi.org/gitlab/ITS/ITS.git ./STF525_Its \
garciay's avatar
garciay committed
    && cd /home/etsi/dev/STF525_Its/scripts \
garciay's avatar
garciay committed
    && chmod 775 *.bash devenv.bash.* \
garciay's avatar
garciay committed
    && cd /home/etsi \
garciay's avatar
garciay committed
    && ln -sf /home/etsi/dev/STF525_Its/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash \
garciay's avatar
garciay committed
    && ls -ltr /home/etsi \
garciay's avatar
garciay committed
    && export HOME=/home/etsi \
    && cd /home/etsi/frameworks \
garciay's avatar
garciay committed
    && git clone https://github.com/vlm/asn1c.git asn1c \
    && cd asn1c \
    && test -f configure || autoreconf -iv \
    && ./configure \
    && make && sudo make install \
    && cd /home/etsi/frameworks \
garciay's avatar
garciay committed
    && wget 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
garciay's avatar
garciay committed
    && . /home/etsi/devenv.bash \
    && cd /home/etsi/dev/STF525_Its/scripts \
    && ./build_titan.bash \
garciay's avatar
garciay committed
    && . /home/etsi/devenv.bash \
garciay's avatar
garciay committed
    && ./update_its_project.bash \
    && cd ${HOME}/dev/etsi_its/src/TestCodec/objs \
    && ../bin/testcodec_generate_makefile.bash \
    && ../bin/run_all.bash 
garciay's avatar
garciay committed

CMD ["/bin/bash"]

# That's all Floks