Skip to content

Commit

Permalink
Merge pull request #30 from Clovel/docker
Browse files Browse the repository at this point in the history
[#6] Added CI build for Docker image
  • Loading branch information
Clovel authored Apr 8, 2020
2 parents 0244ece + 642ceba commit 3be721d
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -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
50 changes: 50 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Source image ----------------------------------
FROM ubuntu:latest

# Docker image information ----------------------
LABEL maintainer="Clovis Durand <cd.clovel19@gmail.com>"
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
15 changes: 15 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3be721d

Please sign in to comment.