Log issue
[eliot.git] / scripts / opc-ua / docker / build.sh
1 #!/bin/bash
2 set -o errexit
3
4 # set the docker name and docker tag when you build
5 DOCKER_NAME=
6 DOCKER_TAG=
7
8 export ELIOT_DIR=$(cd $(dirname $0); pwd)
9 export WORK_DIR=$ELIOT_DIR/work
10 export CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz
11 export SCONS_PPA_URL=http://repo.okay.com.mx/centos/7/x86_64/release//scons-2.3.0-1.el7.centos.noarch.rpm
12 export GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
13 export OPCUA_REPO=https://github.com/edgexfoundry-holding/protocol-opcua-c.git
14 export DOCKER_NAME=${DOCKER_NAME:-"eliot/opc-ua"}
15 export DOCKER_TAG=${DOCKER_TAG:-"latest"}
16
17
18 rm -rf $WORK_DIR
19 mkdir -p $WORK_DIR
20
21 cd $WORK_DIR
22 wget $CMAKE_URL
23 wget $SCONS_PPA_URL
24 wget $GET_PIP_URL
25 git clone $OPCUA_REPO
26
27 cd $ELIOT_DIR
28 docker build ./ -t $DOCKER_NAME:$DOCKER_TAG