Skip to content

Using an explicit MAC address for a codespace container vs local dev container #43584

Answered by cwndrws
worc4021 asked this question in Codespaces
Discussion options

You must be logged in to vote

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:

{
    "runArgs": [
        "--network=bridge",
        "--mac-address=12:34:56:78:9a:bc"
    ]
}

Hope this helps!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by worc4021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform, Question
2 participants