mirror of
https://github.com/dangeroustech/ZeroTierBridge.git
synced 2025-12-06 09:06:58 +00:00
Compare commits
42 Commits
v1.0.0
...
46ee60cbc9
| Author | SHA1 | Date | |
|---|---|---|---|
| 46ee60cbc9 | |||
| bca9ec3df7 | |||
| 5cd683cb7a | |||
| 8d550748cd | |||
| f8d73263fd | |||
| 2c987a3bbe | |||
| be55349cef | |||
| 593036c8ad | |||
|
|
74c33dff3e | ||
| aab5c079dc | |||
|
|
344e30a1f0 | ||
| d3f10891c8 | |||
|
|
7eb72f78f3 | ||
| 6e3c2690fc | |||
|
|
b651c5f8e9 | ||
| 9908f656e7 | |||
| 977df48644 | |||
| fed1c28602 | |||
| b5e79ae24d | |||
|
|
09370a89a7 | ||
| 1c41eb9e1b | |||
| 89e29531f0 | |||
| ec84d91bc3 | |||
|
|
9cc7d36434 | ||
| ab9c1c4816 | |||
|
|
f94f69a8f7 | ||
| 24c26bea0d | |||
|
|
3b4b067420 | ||
| 8e6724ef25 | |||
|
|
dfc86697e4 | ||
| 3a0be9b7dd | |||
|
|
e9b9340604 | ||
| c47edea183 | |||
|
|
ffb7b6f1db | ||
| 44e70e01be | |||
|
|
c35e2e6641 | ||
| 22a62a4c6f | |||
| ad8063651d | |||
|
|
8537d1c215 | ||
| c34324b998 | |||
|
|
278abf43b9 | ||
| bc56fb09ad |
157
.github/workflows/docker-build.yml
vendored
Normal file
157
.github/workflows/docker-build.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
name: Publish Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_IMAGE: registry.dangerous.tech/dangeroustech/zerotierbridge
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Docker_Build:
|
||||||
|
name: "Docker Build And Release"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
arch: ["amd64", "arm64"]
|
||||||
|
version: ["1.12.2"]
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
id: login
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.dangerous.tech
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
build-args: |
|
||||||
|
ARCH=${{ matrix.arch }}
|
||||||
|
VERSION=${{ matrix.version }}
|
||||||
|
push: true
|
||||||
|
platforms: linux/${{ matrix.arch }}
|
||||||
|
# tags: registry.dangerous.tech/dangeroustech/zerotierbridge:latest
|
||||||
|
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true
|
||||||
|
|
||||||
|
- name: Export Digests
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/digests
|
||||||
|
digest="${{ steps.docker_build.outputs.digest }}"
|
||||||
|
touch "/tmp/digests/${digest#sha256:}"
|
||||||
|
|
||||||
|
- name: Upload digest
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: digests
|
||||||
|
path: /tmp/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
MergeRefs:
|
||||||
|
name: "Do The Horrible Merge Thing"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- Docker_Build
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: digests
|
||||||
|
path: /tmp/digests
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
id: login
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.dangerous.tech
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
tags: |
|
||||||
|
# set latest tag for default branch
|
||||||
|
# https://github.com/docker/metadata-action#latest-tag
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
- name: Create manifest list and push
|
||||||
|
working-directory: /tmp/digests
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||||
|
- name: Inspect image
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||||
|
|
||||||
|
- name: Generate SBOM
|
||||||
|
uses: anchore/sbom-action@v0
|
||||||
|
id: sbom
|
||||||
|
with:
|
||||||
|
image: registry.dangerous.tech/dangeroustech/zerotierbridge:latest
|
||||||
|
registry-username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
format: spdx-json
|
||||||
|
output-file: ./sbom.spdx.json
|
||||||
|
|
||||||
|
- name: Scan SBOM
|
||||||
|
uses: anchore/scan-action@v3
|
||||||
|
id: scan
|
||||||
|
with:
|
||||||
|
sbom: sbom.spdx.json
|
||||||
|
severity-cutoff: medium
|
||||||
|
fail-build: false
|
||||||
|
only-fixed: true
|
||||||
|
by-cve: true
|
||||||
|
|
||||||
|
- name: upload Anchore scan SARIF report
|
||||||
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
|
with:
|
||||||
|
sarif_file: ${{ steps.scan.outputs.sarif }}
|
||||||
|
|
||||||
|
- name: Changelog
|
||||||
|
uses: TriPSs/conventional-changelog-action@v3
|
||||||
|
id: changelog
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
git-message: "chore 🤖: Release {version}"
|
||||||
|
output-file: "CHANGELOG.md"
|
||||||
|
tag-prefix: "v"
|
||||||
|
fallback-version: "1.0.0"
|
||||||
|
release-count: 0 # preserve all versions in changelog
|
||||||
|
skip-on-empty: false # otherwise we don't publish fixes
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
id: release
|
||||||
|
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.github_token }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.changelog.outputs.tag }}
|
||||||
|
name: ${{ steps.changelog.outputs.tag }}
|
||||||
|
body: ${{ steps.changelog.outputs.clean_changelog }}
|
||||||
|
files: |
|
||||||
|
sbom.spdx.json
|
||||||
59
.github/workflows/docker-image.yml
vendored
59
.github/workflows/docker-image.yml
vendored
@@ -1,59 +0,0 @@
|
|||||||
name: Publish Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Registry
|
|
||||||
id: registry_push
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: registry.dangerous.tech
|
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and Push
|
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: registry.dangerous.tech/dangeroustech/zerotierbridge:latest
|
|
||||||
|
|
||||||
- name: Changelog
|
|
||||||
uses: TriPSs/conventional-changelog-action@v3
|
|
||||||
id: changelog
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
git-message: "chore 🤖: Release {version} [skip ci]"
|
|
||||||
output-file: "CHANGELOG.md"
|
|
||||||
tag-prefix: "v"
|
|
||||||
fallback-version: "1.0.0"
|
|
||||||
release-count: 0 # preserve all versions in changelog
|
|
||||||
skip-on-empty: false # otherwise we don't publish fixes
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
id: release
|
|
||||||
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.github_token }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
||||||
84
CHANGELOG.md
84
CHANGELOG.md
@@ -1,4 +1,86 @@
|
|||||||
# 1.0.0 (2023-09-22)
|
# [1.1.0](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.13...v1.1.0) (2023-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* multi-platform builds ([aab5c07](https://github.com/dangeroustech/ZeroTierBridge/commit/aab5c079dcd559b7c3123aa72d02f7691827083e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.13](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.12...v1.0.13) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.12](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.11...v1.0.12) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* correct double message ([6e3c269](https://github.com/dangeroustech/ZeroTierBridge/commit/6e3c2690fc612e42c1d2818cc8d4bdfb9d5e39ba))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.11](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.10...v1.0.11) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* only alert on CVEs that have a fix ([977df48](https://github.com/dangeroustech/ZeroTierBridge/commit/977df48644e0a7112dc25f9f04afa6d84ce87db9))
|
||||||
|
* pull correct deb package ([fed1c28](https://github.com/dangeroustech/ZeroTierBridge/commit/fed1c2860230d39aeb80178c79697c1c41fed23d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.10](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.9...v1.0.10) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* upload sarif file ([89e2953](https://github.com/dangeroustech/ZeroTierBridge/commit/89e29531f070539935a93b6f55d791170ea42e72))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.9](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.8...v1.0.9) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.8](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.7...v1.0.8) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.7](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.6...v1.0.7) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.6](https://github.com/dangeroustech/ZeroTierBridge/compare/v0.0.1...v1.0.6) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.5](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.4...v1.0.5) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.4](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.3...v1.0.4) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.3](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.2...v1.0.3) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.2](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.1...v1.0.2) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* quick filter to not release on PRs ([c34324b](https://github.com/dangeroustech/ZeroTierBridge/commit/c34324b998690edeadd3d680987587c0fe93c525))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.1](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.0...v1.0.1) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0](https://github.com/dangeroustech/ZeroTierBridge/compare/f902dcc0c4615801fb65e6c90342efe96789319f...v1.0.0) (2023-09-22)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
FROM debian:buster as stage
|
FROM debian:bookworm as stage
|
||||||
ARG PACKAGE_BASEURL=https://download.zerotier.com/debian/buster/pool/main/z/zerotier-one
|
ARG PACKAGE_BASEURL=https://download.zerotier.com/debian/bookworm/pool/main/z/zerotier-one
|
||||||
ARG ARCH=amd64
|
ARG ARCH=amd64
|
||||||
ARG VERSION=1.12.2
|
ARG VERSION=1.12.2
|
||||||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y ca-certificates curl
|
RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y ca-certificates curl
|
||||||
RUN curl -sSL -o zerotier-one.deb "${PACKAGE_BASEURL}/zerotier-one_${VERSION}_${ARCH}.deb"
|
RUN curl -sSL -o zerotier-one.deb "${PACKAGE_BASEURL}/zerotier-one_${VERSION}_${ARCH}.deb"
|
||||||
|
|
||||||
FROM debian:buster
|
FROM debian:bookworm
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=stage zerotier-one.deb .
|
COPY --from=stage zerotier-one.deb .
|
||||||
|
|||||||
@@ -42,14 +42,10 @@ Disable bridging by passing `ZT_BRIDGE=false`. This can be done after the initia
|
|||||||
|
|
||||||
If you would like the container to retain the same ZeroTier client ID on reboot, attach a volume as per the below.
|
If you would like the container to retain the same ZeroTier client ID on reboot, attach a volume as per the below.
|
||||||
|
|
||||||
`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true --volume zt1:/var/lib/zerotier-one/ zerotierbridge:latest`
|
`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true --volume zt_config:/var/lib/zerotier-one/ zerotierbridge:latest`
|
||||||
|
|
||||||
#### Caveat: Architecture
|
#### Caveat: Architecture
|
||||||
|
|
||||||
If you need to run this on a device with different architecture (a raspberry pi, for instance), then just edit line 3 of the Dockerfile.
|
If you need to run this on a device with different architecture (a raspberry pi, for instance), then just edit line 3 of the Dockerfile.
|
||||||
|
|
||||||
If you were using a Raspberry Pi 4, you would change this to `ARCH=arm64` and the container will pull the correct ZeroTier installer.
|
If you were using a Raspberry Pi 4, you would change this to `ARCH=arm64` and the container will pull the correct ZeroTier installer.
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- Add kubernetes deployment YAML
|
|
||||||
|
|||||||
@@ -3,12 +3,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
zerotierbridge:
|
zerotierbridge:
|
||||||
container_name: zerotierbridge
|
container_name: zerotierbridge
|
||||||
build:
|
image: registry.dangerous.tech/dangeroustech/zerotierbridge
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
args:
|
|
||||||
ARCH: amd64
|
|
||||||
VERSION: 1.12.2
|
|
||||||
restart: always
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.0"
|
"version": "1.1.0"
|
||||||
}
|
}
|
||||||
16
results.sarif
Normal file
16
results.sarif
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "2.1.0",
|
||||||
|
"$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",
|
||||||
|
"runs": [
|
||||||
|
{
|
||||||
|
"tool": {
|
||||||
|
"driver": {
|
||||||
|
"name": "Grype",
|
||||||
|
"version": "0.63.0",
|
||||||
|
"informationUri": "https://github.com/anchore/grype"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"results": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
99659
sbom.spdx.json
Normal file
99659
sbom.spdx.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user