...
 
FROM ubuntu:18.10
LABEL maintainer="OpenBus Users <openbus-users@tecgraf.puc-rio.br>"
# Versions
ENV BOOST_VERSION=1_68_0
ENV BOOST_REMOTE_VERSION=1.68.0
ENV OPENSSL_VERSION=1.0.2p
ENV UUID_VERSION=1.0.3
ENV LDAP_VERSION=2.4.39
# Directories
ENV WORKDIR=/openbus-dev
ENV PACKAGES=$WORKDIR/packages
ENV BOOST_DIR=$WORKDIR/boost_$BOOST_VERSION
ENV OPENSSL_PACKAGE_DIR=$PACKAGES/openssl
ENV OPENLDAP_PACKAGE_DIR=$PACKAGES/openldap
ENV LIBUUID_PACKAGE_DIR=$PACKAGES/libuuid
RUN apt-get update
# Purpose of packages dependencies:
# git: bring dependencies and favor development
# curl: bring packages from urls
# build-essential: ubuntu set of development tools and headers
# groff groff-base: required by soelim in ldap compiling
# libreadline-dev: required by lua compiling
RUN apt-get -y install git curl build-essential groff groff-base libreadline-dev
# Boost dependency (https://boostorg.github.io/build/tutorial.html)
# Unpack boost and Install boost build only
RUN mkdir -p $BOOST_DIR \
&& cd $WORKDIR \
&& curl -L https://dl.bintray.com/boostorg/release/${BOOST_REMOTE_VERSION}/source/boost_${BOOST_VERSION}.tar.bz2 -o boost_${BOOST_VERSION}.tar.bz2 \
&& tar jxf boost_$BOOST_VERSION.tar.bz2 -C $WORKDIR \
&& cd $BOOST_DIR/tools/build \
&& ./bootstrap.sh \
&& ./b2 install \
&& rm $WORKDIR/boost_$BOOST_VERSION.tar.bz2 \
&& rm -Rf $BOOST_DIR
# Install openssl
# OpenSsl are internal in tecgraf
RUN cd $WORKDIR \
&& curl -L http://webserver2.tecgraf.puc-rio.br/ftp_pub/openbus/repository/openssl-$OPENSSL_VERSION.tar.gz -o openssl-$OPENSSL_VERSION.tar.gz \
&& tar zxf $WORKDIR/openssl-$OPENSSL_VERSION.tar.gz -C $WORKDIR \
&& cd $WORKDIR/openssl-$OPENSSL_VERSION \
&& ./config shared --openssldir=$OPENSSL_PACKAGE_DIR \
&& make \
&& make install \
&& rm $WORKDIR/openssl-$OPENSSL_VERSION.tar.gz \
&& rm -rf $WORKDIR/openssl-$OPENSSL_VERSION
# Install LDAP
# LDAP are internal in tecgraf
RUN cd $WORKDIR \
&& curl -L http://webserver2.tecgraf.puc-rio.br/ftp_pub/openbus/repository/openldap-$LDAP_VERSION.tgz -o openldap-$LDAP_VERSION.tgz \
&& tar zxf $WORKDIR/openldap-$LDAP_VERSION.tgz -C $WORKDIR \
&& cd $WORKDIR/openldap-$LDAP_VERSION \
&& ./configure --disable-slapd --with-tls=openssl --with-cyrus-sasl=no --prefix=$OPENLDAP_PACKAGE_DIR LDFLAGS=-L$OPENSSL_PACKAGE_DIR/lib CPPFLAGS=-I$OPENSSL_PACKAGE_DIR/include \
&& make \
&& make install \
&& rm $WORKDIR/openldap-$LDAP_VERSION.tgz \
&& rm -rf $WORKDIR/openldap-$LDAP_VERSION
# Install UUID
# UUID are internal in tecgraf
RUN cd $WORKDIR \
&& curl -L http://webserver2.tecgraf.puc-rio.br/ftp_pub/openbus/repository/libuuid-$UUID_VERSION.tar.gz -o libuuid-$UUID_VERSION.tar.gz \
&& tar zxf libuuid-$UUID_VERSION.tar.gz -C $WORKDIR \
&& cd $WORKDIR/libuuid-$UUID_VERSION \
&& ./configure --prefix=$LIBUUID_PACKAGE_DIR \
&& make \
&& make install \
&& rm $WORKDIR/libuuid-$UUID_VERSION.tar.gz \
&& rm -rf $WORKDIR/libuuid-$UUID_VERSION
# Source functions
ADD scripts/tecgraf_deps.sh $WORKDIR
# Bringing up openbus dependencies
RUN cd $PACKAGES \
&& echo -e "172.30.4.37 git.tecgraf.puc-rio.br\n" >> /etc/hosts \
&& $WORKDIR"/tecgraf_deps.sh"
WORKDIR $WORKDIR/packages/openbus-core/bbuild
# Issue banner
ADD openbus.issue /root
# Hint from interactive prompt
RUN echo "cat /root/openbus.issue" >> /root/.bashrc
\ No newline at end of file
,----..
/ / \ ,---,.
/ . : ,-.----. ,' .' \
. / ;. \\ / \ ,---, ,---.' .' | ,--,
. ; / ` ;| : | ,-+-. / || | |: | ,'_ /| .--.--.
; | ; \ ; || | .\ : ,---. ,--.'|' |: : : / .--. | | : / / '
| : | ; | '. : |: | / \| | ,'' |: | ; ,'_ /| : . | | : /`./
. | ' ' ' :| | \ : / / | | / | || : \| ' | | . . | : ;_
' ; \; / || : . |. ' / | | | | || | . || | ' | | | \ \ `.
\ \ ', / : |`-'' ; /| | | |/ ' : '; |: | : ; ; | `----. \
; : / : : : ' | / | | |--' | | | ; ' : `--' \ / /`--' /
\ \ .' | | : | : | |/ | : / : , .-./'--'. /
`---` `---'.| \ \ /'---' | | ,' `--`----' `--'---'
`---` `----' `----'
** Docker OpenBus Development Environment 2018 - PUC-Rio
Compile: 'b2 warnings=off -sOPENSSL_INSTALL=$OPENSSL_PACKAGE_DIR -sOPENLDAP_INSTALL=$OPENLDAP_PACKAGE_DIR -sUUID_INSTALL=$LIBUUID_PACKAGE_DIR threading=multi'
#!/bin/bash
docker run openbus-dev -it /bin/bash
#!/bin/bash
# function to clone from git specific versions
function git_clone {
if [ -d "$4" ]; then
echo "Dependency $4 is already here (modified name, original: $1)"
return
fi
if [ ! -d "$1" ] || [ -n "$4" ] && [ ! -d "$4" ]; then
echo "Bringing dependency $1..."
local TARGET="$1"
# Bring to diferent directory
if [ -n "$4" ]; then
TARGET="$4"
fi
# Do the clone
git clone -q https://git.tecgraf.puc-rio.br/$2/$1.git $TARGET
if [ $? -ne 0 ]; then
echo "# Cannot bring dependency $1. Check error details."
exit 1
fi
# Change the branch or tag
if [ -n "$3" ]; then
cd "$TARGET"
git checkout "$3"
cd ..
fi
else
echo "Dependency $1 is already here (original name)"
fi
}
# Clone projects
for project in "lua openbus-3rd-party" \
"loop engdist" \
"oil engdist" \
"lce engdist" \
"luuid openbus-3rd-party 1.0" \
"scs-core-lua scs SCS_CORE_LUA_v1_02_03_2012_05_10 luascs" \
"scs-core-idl scs SCS_CORE_IDL_v1_02_00_2010_11_09 scs-idl" \
"lualdap openbus-3rd-party 1.1.0" \
"luafilesystem openbus-3rd-party 1.4.2" \
"luasec openbus-3rd-party" \
"luasocket openbus-3rd-party 2.0.2" \
"struct openbus-3rd-party 1.2 luastruct" \
"vararg openbus-3rd-party 1.1 luavararg" \
"openbus-sdk-lua openbus master luaopenbus" \
"openbus-audit-agent openbus master luaopenbusaudit" \
"luasqlite3 openbus-3rd-party" \
"openbus-idl openbus" \
"openbus-sdk-idl-lib openbus master openbus-lib-idl" \
"openbus-idl openbus 02_00 openbus-legacy-idl" \
"openssl boost-build master openssl.jam" \
"openldap boost-build master openldap.jam" \
"uuid boost-build master uuid.jam" \
"sqlite openbus-3rd-party" \
"luaiconv openbus-3rd-party" \
"openbus-core openbus master"
do
set -- $project
git_clone $1 $2 $3 $4
done
\ No newline at end of file
FROM ubuntu:14.04
MAINTAINER Amtera Semantic Techologies <contact@amtera.com.br>
FROM ubuntu:18.10
MAINTAINER OpenBus Users <openbus-users@tecgraf.puc-rio.br>
ENV OPENBUS_HOME /openbus
ENV PATH="$OPENBUS_HOME/bin:$PATH"
......