-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Clovel/docker
[#6] Added CI build for Docker image
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |