diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..bc2acbf --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,29 @@ +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] + 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 + run: | + cd docker + docker-compose build 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..86f2ac2 --- /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: docker/Dockerfile + volumes: + - '../:/repository' + privileged: true + stdin_open: true + tty: true + entrypoint: /bin/bash