0

I would like to create a new container that has a new Network interface called cifx0.

I have created a Dockerfile including the entrypoint.

My Question is: can I build an entrypoint.sh file like this:

#!/bin/bash

ip link add cifx0 type bridge
ip link set cifx0 up
ip addr add (x.x.x.x)/24 dev cifx0

the image was created but when running the container it gave me error from entrypoint.

4
  • What's the error? Commented Mar 2, 2023 at 9:45
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Mar 2, 2023 at 11:18
  • 2
    You don't get to control the names of network interfaces inside containers. If you need this level of control over the networking setup, a virtual machine would be a better match. Commented Mar 2, 2023 at 11:49
  • Its just a simple question can i build my shell script like this and put it in the Entrypoint of my dockerfile? Commented Mar 3, 2023 at 20:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.