File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+
3+ name : Docker Build & Publish to GitHub Container Registry
4+ on :
5+ push :
6+ branches :
7+ - ' main'
8+ tags :
9+ - ' v*'
10+ env :
11+ REGISTRY : ghcr.io
12+ IMAGE_NAME : stackhpc/tang
13+ jobs :
14+ build-and-push-docker-image :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Log into registry ${{ env.REGISTRY }}
19+ uses : docker/login-action@v1
20+ with :
21+ registry : ${{ env.REGISTRY }}
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+ - name : Setup Docker buildx
25+ uses : docker/setup-buildx-action@v1
26+ - name : Extract Docker metadata
27+ id : meta
28+ uses : docker/metadata-action@v2
29+ with :
30+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
31+ - name : Build and Push Versioned Docker Image
32+ id : build-and-push
33+ uses : docker/build-push-action@v2
34+ if : ${{ github.ref_type == 'tag' }}
35+ with :
36+ context : .
37+ push : true
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
40+ - name : Build and Push Latest Docker Image
41+ id : build-and-push-latest
42+ uses : docker/build-push-action@v2
43+ if : ${{ github.ref == 'refs/heads/main' }}
44+ with :
45+ context : .
46+ push : true
47+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
48+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ FROM rockylinux/rockylinux:8.6.20220707
2+
3+ ENV SUMMARY="Network Presence Binding Daemon." \
4+ DESCRIPTION="Tang is a small daemon for binding data to the presence of a third party. This is a containerized Tang server." \
5+ VERSION=1 \
6+ TANG_LISTEN_PORT=80
7+
8+ LABEL name="stackhpc/tang" \
9+ summary="${SUMMARY}" \
10+ description="${DESCRIPTION}" \
11+ version="${VERSION}" \
12+ usage="podman run -d -p 8080:80 -v tang-keys:/var/db/tang --name tang stackhpc/tang"
13+
14+ RUN dnf update -y && \
15+ dnf install -y \
16+ tang \
17+ socat && \
18+ dnf clean all && \
19+ rm -rf /var/cache/yum
20+
21+ COPY root /
22+
23+ VOLUME ["/var/db/tang" ]
24+ EXPOSE "${TANG_LISTEN_PORT}"
25+
26+ HEALTHCHECK CMD ["/usr/bin/tangd-healthcheck" ]
27+ CMD ["/usr/bin/tangd-entrypoint" ]
Original file line number Diff line number Diff line change 1+ ## Tang docker container image
2+
3+ Runs (tang)[ https://github.com/latchset/tang ] inside a Rocky Linux docker container.
4+
5+ ## Usage
6+
7+ ```
8+ docker run -d -p 8080:80 -v tang-db:/var/db/tang stackhpc/tang
9+ ```
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ TANG_LISTEN_PORT=${TANG_LISTEN_PORT:- 80}
5+
6+ mkdir -p /var/db/tang /var/cache/tang
7+
8+ socat tcp-l:$TANG_LISTEN_PORT ,reuseaddr,fork exec:" /usr/libexec/tangd /var/cache/tang"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu
4+
5+ TANG_LISTEN_PORT=${TANG_LISTEN_PORT:- 80}
6+
7+ tang-show-keys $TANG_LISTEN_PORT
You can’t perform that action at this time.
0 commit comments