Info Docker Version #655

Closed
opened 2025-11-20 05:15:25 -05:00 by saavagebueno · 9 comments
Owner

Originally created by @corasaniti on GitHub (Feb 25, 2024).

It's strange not having the CLI installed for the netbirdio/netbird:latest Docker image

I also wanted to know how I can Dockerize my app using the netbirdio/netbird:latest Docker image. For example I would like to install InfluxDB or Mysql in the netbirdio/netbird:latest image

Thanks in advance

Originally created by @corasaniti on GitHub (Feb 25, 2024). It's strange not having the CLI installed for the netbirdio/netbird:latest Docker image I also wanted to know how I can Dockerize my app using the netbirdio/netbird:latest Docker image. For example I would like to install InfluxDB or Mysql in the netbirdio/netbird:latest image Thanks in advance
saavagebueno added the waiting-feedbackquestion labels 2025-11-20 05:15:25 -05:00
Author
Owner

@mlsmaycon commented on GitHub (Feb 26, 2024):

Hello @corasaniti the binary is part of the docker image, but is not in the path. Since we are using alpine now we will update it so it will be in the path. You can see the current Dockerfile here: https://github.com/netbirdio/netbird/blob/main/client/Dockerfile

As for the second question, you have a couple of options: one is to build the image, copy the binary, and then run netbird in the background, and the other is to use netbird as a side-car container. Below, you will find an example for both:

Build new Nginx image with NetBird
Dockerfile

# NetBird build image
FROM netbirdio/netbird:latest as netbird-build
FROM nginx:alpine
# Copy NetBird binary
COPY --from=netbird-build /go/bin/netbird /bin/netbird

# Copy modified entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT /entrypoint.sh

entrypoint.sh

#!/bin/sh

echo "Starting netbird"
/bin/netbird up &

echo "running regular entrypoint script"
/regular_entrypoint.sh

Run NetBird as sidecar container

version: '3.8'
services:
  nginx:
    image: nginx:alpine
    volumes:
      - ./content:/usr/share/nginx/html:ro
    ports: 
      - 80:80 # needed for access without netbird
  netbird:
    image: netbirdio/netbird:latest
    volumes:
      - ./client:/etc/netbird
    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
      - SYS_RESOURCE
    environment:
      NB_SETUP_KEY: SETUP_KEY
      NB_HOSTNAME: <hostname>
    # link NetBird network to Nginx
    network_mode: "service:nginx"
@mlsmaycon commented on GitHub (Feb 26, 2024): Hello @corasaniti the binary is part of the docker image, but is not in the path. Since we are using alpine now we will update it so it will be in the path. You can see the current Dockerfile here: https://github.com/netbirdio/netbird/blob/main/client/Dockerfile As for the second question, you have a couple of options: one is to build the image, copy the binary, and then run netbird in the background, and the other is to use netbird as a side-car container. Below, you will find an example for both: **Build new Nginx image with NetBird** Dockerfile ``` # NetBird build image FROM netbirdio/netbird:latest as netbird-build FROM nginx:alpine # Copy NetBird binary COPY --from=netbird-build /go/bin/netbird /bin/netbird # Copy modified entrypoint COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT /entrypoint.sh ``` entrypoint.sh ```shell #!/bin/sh echo "Starting netbird" /bin/netbird up & echo "running regular entrypoint script" /regular_entrypoint.sh ``` **Run NetBird as sidecar container** ```YAML version: '3.8' services: nginx: image: nginx:alpine volumes: - ./content:/usr/share/nginx/html:ro ports: - 80:80 # needed for access without netbird netbird: image: netbirdio/netbird:latest volumes: - ./client:/etc/netbird cap_add: - NET_ADMIN - SYS_ADMIN - SYS_RESOURCE environment: NB_SETUP_KEY: SETUP_KEY NB_HOSTNAME: <hostname> # link NetBird network to Nginx network_mode: "service:nginx" ```
Author
Owner

@neo773 commented on GitHub (Feb 26, 2024):

Hi,
Is this a video bounty?

@neo773 commented on GitHub (Feb 26, 2024): Hi, Is this a video bounty?
Author
Owner

@mlsmaycon commented on GitHub (Feb 26, 2024):

@neo773 no, that's some bug from Algora.

@mlsmaycon commented on GitHub (Feb 26, 2024): @neo773 no, that's some bug from Algora.
Author
Owner

@mlsmaycon commented on GitHub (Feb 26, 2024):

no, we don't have a bounty for this issue. I've contacted Algora to check this.

@mlsmaycon commented on GitHub (Feb 26, 2024): no, we don't have a bounty for this issue. I've contacted Algora to check this.
Author
Owner

@adasauce commented on GitHub (Feb 27, 2024):

@mlsmaycon thanks for providing this example as a sidecar example, it worked great for me.

I looked around the documentation for something like this and didn't find anything, it might be useful to add to the official docs?

@adasauce commented on GitHub (Feb 27, 2024): @mlsmaycon thanks for providing this example as a sidecar example, it worked great for me. I looked around the documentation for something like this and didn't find anything, it might be useful to add to the official docs?
Author
Owner

@mlsmaycon commented on GitHub (Feb 27, 2024):

hello @adasauce , yes it would be great! If you want to contribute, you can open a pull request in our docs: https://github.com/netbirdio/docs

@mlsmaycon commented on GitHub (Feb 27, 2024): hello @adasauce , yes it would be great! If you want to contribute, you can open a pull request in our docs: https://github.com/netbirdio/docs
Author
Owner

@bodiroga commented on GitHub (Apr 20, 2024):

Hi @mlsmaycon!

Thanks for the side-car container example provided at https://github.com/netbirdio/netbird/issues/1621#issuecomment-1963580878, it works great!

Anyway, I have a few questions about the Docker client implementation (by the way, I'm using your cloud service, not a self-hosted installation):

  • Why does the /go/bin/netbird status command report nothing? Here you have what the output looks like:
Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
  • Why can't I ping my netbird devices by their hostnames? From my computer I can ping them with no problem, but from the Docker container is always says: ping: bad address '<hostname>'

Many thanks again for your work!

@bodiroga commented on GitHub (Apr 20, 2024): Hi @mlsmaycon! Thanks for the side-car container example provided at https://github.com/netbirdio/netbird/issues/1621#issuecomment-1963580878, it works great! Anyway, I have a few questions about the Docker client implementation (by the way, I'm using your cloud service, not a self-hosted installation): - Why does the ```/go/bin/netbird status``` command report nothing? Here you have what the output looks like: ```bash Error: failed to connect to daemon error: context deadline exceeded If the daemon is not running please run: ``` - Why can't I ping my netbird devices by their hostnames? From my computer I can ping them with no problem, but from the Docker container is always says: ```ping: bad address '<hostname>'``` Many thanks again for your work!
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @corasaniti,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @corasaniti, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#655