Skip to content

Commit

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

env:
REGISTRY: ghcr.io
IMAGE_NAME: bounverif/cyclonedds
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
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
8 changes: 8 additions & 0 deletions cyclonedds/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.10

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

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

0 comments on commit cf843fd

Please sign in to comment.