Commit 6c5fa5e4 authored by Garcia's avatar Garcia
Browse files

Add Docker/Jenkins support

parent 7b8c3aa3
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
#FROM gcc:latest
FROM ubuntu:16.04
FROM gcc:latest

MAINTAINER STF549

@@ -14,10 +13,8 @@ ARG PASSWORD
RUN echo "docker-titan" > /etc/hostname \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
    && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:webupd8team/java \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt full-upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
    && DEBIAN_FRONTEND=noninteractive apt-get autoclean -y \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
      autoconf \
      bison \
@@ -29,8 +26,6 @@ RUN echo "docker-titan" > /etc/hostname \
      expect \
      flex \
      graphviz \
      gcc-7 \
      g++-7 \
      gdb \ 
      git-core \
      gnutls-bin \
@@ -91,7 +86,8 @@ RUN echo "docker-titan" > /etc/hostname \
    && cd /home/stf549 \
    && . /home/stf549/devenv.bash \
    && cd /home/stf549/STF549_Ng112/scripts \
    && ./update_emcom_project.bash 



CMD ["/bin/bash"]

+14 −2
Original line number Diff line number Diff line
#!/bin/bash
#set -e
set -vx
set -e
#set -vx

DOCKER_FILE=./Dockerfile
if [ -f ${DOCKER_FILE} ]
then
    docker rmi -f $(docker images -q)
    docker build --tag stf549_ng112 --force-rm --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} .
    if [ "$?" != "0" ]
    then
        echo "Docker build failed: $?"
        exit -1
    fi
    docker image ls -a
    docker inspect stf549_ng112:latest
    if [ "$?" != "0" ]
    then
        echo "Docker inspect failed: $?"
        exit -1
    fi
else
    exit -2
fi

# That's all Floks
exit 0