diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..73f8107752b73ae5f1ec50b7022208d458bf4529 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM ubuntu:20.04 + +# Install build tools for sdptr and the C language OPC-UA lib +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common && \ + DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:open62541-team/ppa && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake git make g++ build-essential pkg-config libboost-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev libopen62541-1-dev libopen62541-1-tools && \ + apt-get clean + +# Copy sdptr +COPY . /sdptr + +# Build and install +RUN cd /sdptr && \ + autoreconf -v -f -i && \ + ./configure && \ + bash -c "make -j `nproc` install" + +# Remove source +RUN rm -rf /sdptr + +# Remove build dependencies +RUN DEBIAN_FRONTEND=noninteractive apt-get purge -y autoconf automake git make g++ build-essential libboost-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev + +RUN DEBIAN_FRONTEND=noninteractive apt-get autoremove -y + +RUN DEBIAN_FRONTEND=noninteractive apt-get clean