Skip to content

Commit

Permalink
Merge pull request #3 from truenas/NAS-122154
Browse files Browse the repository at this point in the history
NAS-122154 / 23.10 / Add rsyncd container
  • Loading branch information
stavros-k authored Jun 5, 2023
2 parents 5113a49 + 5f7f25f commit fee0fdb
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,47 @@ jobs:
matrix:
containers:
- app: tftpd-hpa
- app: rsyncd

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36
with:
files: |
apps/${{ matrix.containers.app }}/**
# TODO: We should later look into getting the changed files before the matrix
# and generate a matrix based on the changed files.
- name: Detect changes
id: detect_changes
shell: bash
run: |
if [ -n "${{ steps.changed-files.outputs.all_changed_files }}" ]; then
echo "Changes detected, proceeding with build."
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "No changes detected, skipping build."
echo "skip=true" >> $GITHUB_OUTPUT
# Login first so we can pull the manifest
# even if the repository is private
- name: Login to DockerHub
if: steps.detect_changes.outputs.skip == 'false'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Prepare
if: steps.detect_changes.outputs.skip == 'false'
id: prepare
shell: bash
run: |
Expand Down Expand Up @@ -67,7 +95,7 @@ jobs:
echo "APP_VERSION=$OUTPUT_VERSION" >> $GITHUB_OUTPUT
- name: Build and push Docker images
if: steps.prepare.outputs.APP_VERSION != ''
if: ${{ steps.detect_changes.outputs.skip == 'false' && steps.prepare.outputs.APP_VERSION != '' }}
uses: docker/build-push-action@91df6b874e498451163feb47610c87c4a218c1ee
with:
context: apps/${{ matrix.containers.app }}/
Expand Down
14 changes: 14 additions & 0 deletions apps/rsyncd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM debian:bookworm-slim

LABEL maintainer="iXsystems <[email protected]>"
LABEL description="rsynd on debian bookworm"

RUN apt update && \
apt install -y rsync procps && \
apt clean && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["rsync", "--daemon", "--no-detach", "--config=/etc/rsyncd.conf"]

HEALTHCHECK --interval=5s --timeout=10s --retries=3 \
CMD pgrep rsync || exit 1
22 changes: 22 additions & 0 deletions apps/rsyncd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# rsyncd

⚠️ This container is used for the TrueNAS SCALE app `rsyncd`. ⚠️

⚠️ While it should work, it's not intended to be used as a standalone container. ⚠️

`GitHub` - truenas/containers - https://github.com/truenas/containers/tree/master/apps/rsyncd

## Docker run

```shell
docker run -d \
--name rsyncd \
-v /path/of/some/files:/rsync \
-v /path/of/some/config:/etc/rsyncd.conf \
-p 873:873 \
truenas/rsyncd:latest
```

Note that port 873 is the default port (Unless changed in the mounted config file) for rsyncd.
If you want to use a different port, you can change the port mapping to something like `-p 1234:873`.
(Change `873` to the port you defined in your config file)
1 change: 1 addition & 0 deletions apps/rsyncd/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0

0 comments on commit fee0fdb

Please sign in to comment.