-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NextMN-Lite & update srv6/srv6-ctrl
- Loading branch information
1 parent
9f56ff4
commit 2d60208
Showing
19 changed files
with
716 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Docker Image CI - CP-Lite | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'cp-lite/**' | ||
branches: [ master ] | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [docker-build] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ vars.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPO_CP_LITE }} | ||
tags: | | ||
type=raw,enable=true,priority=100,prefix=bookworm-,suffix=-slim,value={{date 'YYYY-MM-DD'}}-{{sha}} | ||
flavor: | | ||
latest=true | ||
prefix= | ||
suffix= | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: "{{defaultContext}}:cp-lite" | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
build-args: BUILD_DATE=${{ steps.date.outputs.date }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Docker Image CI - gNB-Lite | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'gnb-lite/**' | ||
branches: [ master ] | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [docker-build] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ vars.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPO_GNB_LITE }} | ||
tags: | | ||
type=raw,enable=true,priority=100,prefix=bookworm-,suffix=-slim,value={{date 'YYYY-MM-DD'}}-{{sha}} | ||
flavor: | | ||
latest=true | ||
prefix= | ||
suffix= | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: "{{defaultContext}}:gnb-lite" | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
build-args: BUILD_DATE=${{ steps.date.outputs.date }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Docker Image CI - UE-Lite | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'ue-lite/**' | ||
branches: [ master ] | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [docker-build] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ vars.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPO_UE_LITE }} | ||
tags: | | ||
type=raw,enable=true,priority=100,prefix=bookworm-,suffix=-slim,value={{date 'YYYY-MM-DD'}}-{{sha}} | ||
flavor: | | ||
latest=true | ||
prefix= | ||
suffix= | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: "{{defaultContext}}:ue-lite" | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
build-args: BUILD_DATE=${{ steps.date.outputs.date }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.PHONY: docker | ||
|
||
all: docker/upf docker/srv6 docker/srv6-ctrl | ||
all: docker/upf docker/srv6 docker/srv6-ctrl docker/ue-lite docker/gnb-lite docker/cp-lite | ||
docker/%: | ||
docker buildx build -t louisroyer/dev-nextmn-$(@F) ./$(@F) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2024 Louis Royer. All rights reserved. | ||
# Use of this source code is governed by a MIT-style license that can be | ||
# found in the LICENSE file. | ||
# SPDX-License-Identifier: MIT | ||
|
||
FROM golang:1.22 AS builder | ||
ARG COMMIT=v0.0.1 | ||
RUN : ${COMMIT:? Missing build-arg COMMIT.} && go install github.com/nextmn/cp-lite@${COMMIT} | ||
|
||
|
||
FROM louisroyer/base-irit:latest | ||
|
||
LABEL maintainer="Louis Royer <[email protected]>" \ | ||
org.opencontainers.image.authors="Louis Royer <[email protected]>" \ | ||
org.opencontainers.image.source="https://github.com/louisroyer-docker/nextmn" | ||
|
||
# Used to disable caching of next steps, if not build since 1 day, | ||
# allowing to search and apply security upgrades | ||
ARG BUILD_DATE="" | ||
|
||
RUN apt-get update -q && DEBIAN_FRONTEND=non-interactive apt-get install -qy --no-install-recommends --no-install-suggests \ | ||
docker-setup \ | ||
&& apt-get upgrade -qy \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=builder /go/bin/cp-lite /usr/local/bin/cp-lite | ||
COPY ./*.sh /usr/local/bin/ | ||
COPY ./template-cp-lite.yaml /usr/local/share/nextmn/ | ||
ENV ROUTING_SCRIPT="docker-setup" \ | ||
ONESHOT="true" \ | ||
TEMPLATE_SCRIPT="template-script.sh" \ | ||
TEMPLATE_SCRIPT_ARGS="" \ | ||
CONFIG_FILE="/etc/nextmn/cp-lite.yaml" \ | ||
CONFIG_TEMPLATE="/usr/local/share/nextmn/template-cp-lite.yaml" | ||
|
||
ENTRYPOINT ["entrypoint.sh"] | ||
CMD ["--help"] | ||
|
||
HEALTHCHECK --interval=1m --timeout=1s --retries=3 --start-period=5s --start-interval=100ms \ | ||
CMD ["entrypoint.sh", "healthcheck"] |
Oops, something went wrong.