Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to add a static custom IP to a docker container using terminal

Featured Replies

Hi
I use the following command to add a new docker container in unraid:
 

docker run -d \

--name orderer.test.jedo.btc \

-e CORE_LOGGING_LEVEL=debug \

-v /mnt/user/appdata/fabric/jedo-network/config/orderer.yaml:/etc/hyperledger/fabric/orderer.yaml \

-v /mnt/user/appdata/fabric/jedo-network/config/genesisblock:/etc/hyperledger/fabric/genesisblock \

-v /mnt/user/appdata/fabric/jedo-network/crypto-config/ordererOrganizations/test.jedo.btc/orderers/orderer.test.jedo.btc/tls:/etc/hyperledger/orderer/tls \

-v /mnt/user/appdata/fabric/jedo-network/crypto-config/ordererOrganizations/test.jedo.btc/orderers/orderer.test.jedo.btc/msp:/etc/hyperledger/orderer/msp \

-v /mnt/user/appdata/fabric/jedo-network/ledger:/var/hyperledger/production \

-p 7050:7050 \

hyperledger/fabric-orderer:latest

This adds a Hyperledger Fabric Node for a private Blockchain.

By default, it runs on my unraid IP, but I like to have a spare one like 192.168.0.21

 

I tried the "--ip 192.168.0.21", without success, while starting the container, the node reports "Failed to listen: listen tcp 192.168.0.21:7050: bind: cannot assign requested address".

Any ideas? Thanks

 

 

Thanks

  • 2 weeks later...

I'm also very interested in this, as I want to run some custom do ker containers, and I would like to assign from command line an ip address on my br0

 

Anyone knows the missing command? 

Edited by DeNiX

  • Community Expert

you need to specify a network (that you have already created) with --net=mycoolnetwork (usually easiest to use existing bridge networks) and add --ip=192.168.1.111
You don't need to specify ports if containers get their own IP, everything is available on native ports.


That said, just build your own template and add everything there, then you can manage it like other Unraid containers.

There is also a docker compose plugin for more complex deployments.

I never found the manual or guidance to create a template, if you have a link or something would be nice, and the container I want to keep on br0 with an ip address directly from my router not with custom network as I want to give it rules from the router for the rest of the networking needs. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.