From 6f802ed770ad753f95abdf6567ee75537c52ca0d Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Tue, 9 Feb 2021 00:23:14 +0000 Subject: [PATCH] prepare for docker image of ifcopenshell --- .github/workflows/ci.yml | 16 ++++++++-------- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ce94acef8..9e1498f390 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,15 @@ jobs: needs: activate steps: - uses: actions/checkout@v2 -# - name: python -# run: | -# python3 mo.py -i data/ifc_files/3pieces_1zone-with-materials-with-sensors.ifc -o data/ifc_files/3pieces_1zone-with-materials-with-sensors -# cat toto.mo - - name: Update ubuntu + + - + name: Update ubuntu run: | sudo apt update sudo apt-get install git cmake gcc g++ libboost1.67-all-dev python3-all-dev swig libpcre3-dev libxml2-dev sudo apt-get install liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev - - name: Build ibat + - + name: Build ifcopenshell run: | mkdir build && cd build cmake \ @@ -48,7 +47,8 @@ jobs: ../cmake make -j10 make install - - name: Package + - + name: Package run: | make package working-directory: build @@ -58,7 +58,7 @@ jobs: # Artifact name name: ifcos-artifacts # Directory containing files to upload - path: build/assets/ifcos-* + path: build/assets/Ifc* deliver: runs-on: ubuntu-20.04 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..e47b919e90 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# -*- mode: Dockerfile -*- + +FROM ubuntu:focal + +ARG CHANNEL +ENV CHANNEL=${CHANNEL:-latest} +RUN apt-get update \ + && apt-get install -y \ + vim \ + ssh \ + sudo \ + wget \ + software-properties-common ;\ + rm -rf /var/lib/apt/lists/* + +RUN useradd --user-group --create-home --shell /bin/bash feelpp ;\ + echo "feelpp ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + + +ENV DEBIAN_FRONTEND=noninteractive +RUN echo "deb http://archive.ubuntu.com/ubuntu focal-proposed main restricted" | tee -a /etc/apt/sources.list; \ + echo "deb http://archive.ubuntu.com/ubuntu focal-proposed universe" | tee -a /etc/apt/sources.list; \ + echo "deb http://archive.ubuntu.com/ubuntu focal-proposed multiverse" | tee -a /etc/apt/sources.list; \ + apt-get -qq update; \ + apt-get -y install tzdata dos2unix rsync; \ + apt-get -y install libxml2 liboce-foundation11 liboce-modeling11 liboce-ocaf11 liboce-visualization11 liboce-ocaf-lite11; \ + rm -rf /var/lib/apt/lists/* ; + +COPY . /home/feelpp/ +RUN ls -lrtR /home/feelpp + +RUN dpkg -i /home/feelpp/*.deb + +USER feelpp +