Using an explicit MAC address for a codespace container vs local dev container #43584
-
Select Topic AreaQuestion BodyHello! I have been working with dev containers locally (in vscode) for a while now and have some useful ones set up that work for me locally. I've been working towards extending them to be accessible in the codespace environment and most of them are straightforward. However, for a particular commercial software I have to use a license file that tries to validate the MAC address of the machine against a registered one. So in order to use it in a container, I need to launch the container with an explicit MAC address. So at the
When I try to run my image based dev container, I get the following error:
I was able to do all my other dev container to codespace migrations without having to break the functionality for the counterpart (all dev containers work locally still and also in the codespaces). I would really like to be able to use this container in codespaces too, what would be the best-practise way to avoid having to set up additional networks and services etc to use a compose instead of a pure image? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! 👋 Thanks for writing in! You are unable to set the MAC address explicitly when using the default host networking mode in docker. In order to set the MAC address like this, you need to choose a different docker networking mode. Here's an example repo that I set up that works to set the MAC address explicitly for me: https://github.com/cwndrws/codespaces-networking-testing The devcontainer settings:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi! 👋 Thanks for writing in!
You are unable to set the MAC address explicitly when using the default host networking mode in docker. In order to set the MAC address like this, you need to choose a different docker networking mode. Here's an example repo that I set up that works to set the MAC address explicitly for me: https://github.com/cwndrws/codespaces-networking-testing
The devcontainer settings:
Hope this helps!