Skip to content

Commit

Permalink
install opensips package using pip
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusstefan committed Oct 28, 2024
1 parent 5c855c8 commit e9e562b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 11 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-push-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Push OpenSIPS Python Images in Docker Hub

on:
push:
repository_dispatch:
workflow_dispatch:

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: opensips/python-opensips:latest
26 changes: 26 additions & 0 deletions .github/workflows/docker-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Update Docker Hub Description
on:
push:
branches:
- main
paths:
- docker/docker.md
- .github/workflows/docker-readme.yml

jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4


- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: opensips/python-opensips
readme-filepath: ./docker/docker.md
short-description: ${{ github.event.repository.description }}
enable-url-completion: true
12 changes: 1 addition & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
FROM python:3.9-slim-buster
LABEL maintainer="Darius Stefan <[email protected]>"

RUN apt-get -y update -qq && \
apt-get -y install git

RUN git clone https://github.com/OpenSIPS/python-opensips.git /usr/src/python-opensips && \
cd /usr/src/python-opensips && \
python3 setup.py install &&\
cd / && rm -rf /usr/src/python-opensips

RUN apt-get purge -y git && \
apt-get autoremove -y && \
apt-get clean
RUN pip install opensips

ADD "run.sh" "/run.sh"

Expand Down

0 comments on commit e9e562b

Please sign in to comment.