Skip to content

Commit

Permalink
Add cyclonedds-devel container
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Apr 27, 2024
1 parent cf843fd commit f4290c2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/cyclonedds-devel-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build cyclonedds-devel container
on:
workflow_dispatch:
push:
paths:
- cyclonedds-devel/Dockerfile
- .github/workflows/cyclonedds-devel-build.yml # Self-trigger

env:
REGISTRY: ghcr.io
IMAGE_NAME: bounverif/cyclonedds-devel
VERSION: latest

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v5
with:
context: cyclonedds-devel
build-args: "VERSION=${{ env.VERSION }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
23 changes: 23 additions & 0 deletions cyclonedds-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.10

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y \
sudo \
git \
build-essential \
cmake \
ninja-build \
cyclonedds-tools \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/eclipse-cyclonedds/cyclonedds.git /tmp/cyclonedds && \
cmake -S/tmp/cyclonedds -B/tmp/cyclonedds/build && \
cmake --build /tmp/cyclonedds/build --target install && \
rm -rf /tmp/cyclonedds

RUN git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx.git /tmp/cyclonedds-cxx && \
cmake -S/tmp/cyclonedds-cxx -B/tmp/cyclonedds-cxx/build && \
cmake --build /tmp/cyclonedds-cxx/build --target install && \
rm -rf /tmp/cyclonedds-cxx

RUN python3 -m pip install --no-cache-dir cyclonedds

0 comments on commit f4290c2

Please sign in to comment.