From 060d2197512eb6e9b3cd0d2e9bf0d0bf484125dd Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Sun, 5 Apr 2020 13:04:53 +0200 Subject: [PATCH 1/4] Added Docker image for OSCO OD Generator project Signed-off-by: Clovis Durand --- docker/Dockerfile | 50 +++++++++++++++++++++++++++++++++++++++ docker/docker-compose.yml | 15 ++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/docker-compose.yml diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..a993578 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,50 @@ +# Source image ---------------------------------- +FROM ubuntu:latest + +# Docker image information ---------------------- +LABEL maintainer="Clovis Durand " +LABEL name="OSCO OD Generator" + +# Update package manager ------------------------- +RUN apt-get update +RUN apt-get upgrade -y + +# Install packages ------------------------------ +RUN apt-get install -y \ +git \ +build-essential \ +cmake \ +pkg-config \ +doxygen \ +graphviz \ +vim \ +nano \ +curl \ +net-tools \ +iproute2 \ +sudo \ +libncurses-dev \ +libcpprest-dev \ +python3 \ +python3-pip + +# Clean package managers ------------------------ +RUN apt-get autoclean +RUN apt-get clean +RUN apt-get autoremove -y + +# Set up binds/volumes -------------------------- + +# Set up the SSH agent -------------------------- + +# Make work directory --------------------------- +RUN mkdir -p /repository + +# Set up development toolchains ----------------- + +# Set up environment variables ------------------ + +# Set up user (if not root) --------------------- + +# Set up working directory ---------------------- +WORKDIR /repository diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..dc5496b --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.7" + +services: + osco-od-gen-image: + image: osco-od-gen-image + container_name: osco-od-gen-image + build: + context: ../ + dockerfile: Dockerfile + volumes: + - '../:/repository' + privileged: true + stdin_open: true + tty: true + entrypoint: /bin/bash From 185d1f3b5926f08e5194a910e9d87778ae11c020 Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Wed, 8 Apr 2020 15:21:49 +0200 Subject: [PATCH 2/4] Added CI to build the Docker image Signed-off-by: Clovis Durand --- .github/workflows/docker-build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..07aa8bf --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,30 @@ +name: Docker build +#author: Clovis Durand +#description: GitHub action to build the OSCO-OD-Gen project + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # TODO : Make this work for Windows + # os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macOS-latest] + package_manager: [npm] + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Checkout submodules + run: | + git submodule sync --recursive + git submodule update --init --recursive + + - name: Build Docker image + if: matrix.os != 'windows-latest' + run: | + cd docker + docker-compose build From 0ae9ae60a6bfd03fb9ab7760b7395cd8f90498e0 Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Wed, 8 Apr 2020 15:40:38 +0200 Subject: [PATCH 3/4] Fixed docker-compose Signed-off-by: Clovis Durand --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index dc5496b..86f2ac2 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,7 @@ services: container_name: osco-od-gen-image build: context: ../ - dockerfile: Dockerfile + dockerfile: docker/Dockerfile volumes: - '../:/repository' privileged: true From 642cebaab1944183112f8853950e29966c5f1537 Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Wed, 8 Apr 2020 15:47:23 +0200 Subject: [PATCH 4/4] Remove macOS build for Docker CI Signed-off-by: Clovis Durand --- .github/workflows/docker-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 07aa8bf..bc2acbf 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -11,7 +11,7 @@ jobs: matrix: # TODO : Make this work for Windows # os: [ubuntu-latest, macOS-latest, windows-latest] - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest] package_manager: [npm] steps: @@ -24,7 +24,6 @@ jobs: git submodule update --init --recursive - name: Build Docker image - if: matrix.os != 'windows-latest' run: | cd docker docker-compose build