Add Dockerfile for nfd-status-http-server
Change-Id: I87349b2cf351c7323d8511677ce7f4a31d944387
This commit is contained in:
1 parent
6ba08cd5cb
commit
23135a4cdd
4 files changed
+57
-3
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
Dockerfile
|
||||||
|
|
||||||
|
/build/
|
||||||
|
.waf-*-*/
|
||||||
|
.waf3-*-*/
|
||||||
|
.lock-waf*
|
||||||
|
|
||||||
|
/VERSION.info
|
||||||
@@ -15,10 +15,9 @@ permissions:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
nfd:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -37,7 +36,7 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/nfd
|
||||||
flavor: latest=true
|
flavor: latest=true
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
@@ -48,3 +47,35 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
nfd-status-http-server:
|
||||||
|
needs: nfd
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to ${{ env.REGISTRY }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/nfd-status-http-server
|
||||||
|
flavor: latest=true
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./tools
|
||||||
|
file: ./tools/Dockerfile.nfd-status-http-server
|
||||||
|
pull: true
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
@@ -27,6 +27,9 @@ COPY --from=builder /usr/lib/libndn-cxx.so* /usr/lib/
|
|||||||
COPY --from=builder /usr/bin/nfd /usr/bin/
|
COPY --from=builder /usr/bin/nfd /usr/bin/
|
||||||
COPY --from=builder /usr/bin/nfdc /usr/bin/
|
COPY --from=builder /usr/bin/nfdc /usr/bin/
|
||||||
|
|
||||||
|
COPY --from=builder /usr/bin/nfd-status-http-server /usr/bin/
|
||||||
|
COPY --from=builder /usr/share/ndn/ /usr/share/ndn/
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
VOLUME /run/nfd
|
VOLUME /run/nfd
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
FROM ghcr.io/named-data/nfd:latest
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends python3 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
VOLUME /run/nfd
|
||||||
|
|
||||||
|
EXPOSE 8080/tcp
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/nfd-status-http-server"]
|
||||||
|
CMD ["--address", "0.0.0.0", "--port", "8080"]
|
||||||
Reference in new issue
Block a user