fix dockerfile path

This commit is contained in:
Laura Batalha 2025-05-03 22:03:25 +01:00
parent 488e81aad5
commit bf6559de05
No known key found for this signature in database
GPG key ID: FF87260D8C08DA64
3 changed files with 54 additions and 21 deletions

View file

@ -1,7 +1,7 @@
name: Build Reticulum name: Build Reticulum
env: env:
REGISTRY_IMAGE: ${{ github.repository_owner }}/reticulum REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/reticulum
on: on:
push: push:
@ -24,18 +24,18 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
test: # test:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- name: Set up Python # - name: Set up Python
uses: actions/setup-python@v5 # uses: actions/setup-python@v5
with: # with:
python-version: 3.x # python-version: 3.x
- run: make test # - run: make test
package: package:
needs: test #needs: test
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ contains(github.ref, '-') && 'development' || 'production' }} environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
@ -102,6 +102,8 @@ jobs:
needs: release needs: release
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
packages: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -110,25 +112,25 @@ jobs:
- linux/arm64 - linux/arm64
- linux/arm/v7 - linux/arm/v7
- linux/arm/v6 - linux/arm/v6
- linux/386
- linux/ppc64le
- linux/riscv64
- linux/s390x
environment: ${{ contains(github.ref, '-') && 'development' || 'production' }} environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
steps: steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: lbatalha/reticulum:${{ github.ref_name }} images: ${{ env.REGISTRY_IMAGE }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU # - name: Set up QEMU
uses: docker/setup-qemu-action@v3 # uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -138,15 +140,18 @@ jobs:
# - name: Build and push # - name: Build and push
# uses: docker/build-push-action@v6 # uses: docker/build-push-action@v6
# with: # with:
# context: .git st
# file: docker/Dockerfile.dist # file: docker/Dockerfile.dist
# platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6, linux/386, linux/ppc64le # platforms: linux/amd64,linux/arm64
# push: true # push: true
# tags: ${{ github.repository_owner }}/reticulum:${{ github.ref_name }} # tags: ${{ env.REGISTRY_IMAGE }}
- name: Build and push by digest - name: Build and push by digest
id: build id: build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: docker/Dockerfile.dist context: .
file: docker/Dockerfile.release
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
tags: ${{ env.REGISTRY_IMAGE }} tags: ${{ env.REGISTRY_IMAGE }}
@ -169,6 +174,8 @@ jobs:
container-manifest-merge: container-manifest-merge:
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
packages: write
needs: needs:
- build-containers-release - build-containers-release
steps: steps:

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ tests/rnsconfig/storage
tests/rnsconfig/logfile* tests/rnsconfig/logfile*
*.data *.data
*.result *.result
.vscode

25
docker/Dockerfile.release Normal file
View file

@ -0,0 +1,25 @@
FROM python:3.13-alpine as build
RUN apk add --no-cache build-base linux-headers libffi-dev libressl-dev cargo
ENV PIP_ROOT_USER_ACTION=ignore
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_NO_CACHE_DIR=1
RUN pip install rns
FROM python:3.13-alpine
COPY --from=build /usr/local/bin/ /usr/local/bin/
RUN mkdir /config
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns dialout
RUN chown rns:rns /config
USER rns:rns
VOLUME ["/config"]
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["/usr/local/bin/rnsd", "--config", "/config"]