create_docker_container.sh
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sat, 13 Aug 2022 15:51:59 +0200
changeset 86 3564991cd359
parent 37 fd09116d3537
child 120 02e37d9e96a9
permissions -rwxr-xr-x
SNAP: replace lxml versions to be compatible with Beremiz.

Forcing ubuntu20 python-lxml (4.5.0) package instead of PIP vesrion (4.9.1).
4.9.1 leads to derived variable types to appear as "derived" instead of real type name.
Problem happens with plcopen/variables_infos.ysl2 and plcopen/VariableInfoCollector.py.
No clue for now about what really breaks.
#!/bin/bash

set -e

# absolute path to directory containing parent directory of that script
# (i.e. source directory containing beremiz, matiec, etc..)
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
echo "SOURCE direcory : $SRCDIR"

# absolute path to build directory. ~/build if not given as only argument
BUILDDIR=${1:-~/build}
mkdir -p $BUILDDIR
echo "BUILD direcory : $BUILDDIR"

UNAME=devel
UHOME=/home/$UNAME

echo "Creating docker container"
docker create \
       --name beremiz_public_builder_current \
       -v $SRCDIR:$UHOME/src \
       -v $BUILDDIR:$UHOME/build \
       -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 \
       -w $UHOME/build \
       -i -t beremiz_public_builder /bin/bash