How to Assign Fixed IP to docker’s container on the Same Network Segment as Host in Virtual Machine centos7

  docker, question

I am a rookie. I have a problem using docker. I hope you will give me more advice.
Operating environment:

Centos7 in Virtual Machine
 docker 1.8
 Create containert1
 Tools used pipwork

It is expected to assign fixed IP to test1

Attempts have been made to
1、 article uses pIPwork to allocate fixed ip.
2、 script approach

Results: container cannot ping other machines in the local area network, but can ping the host computer, grabbing packets through tcpdump. It is the mac address of container that is sent to the route. According to my personal understanding, it should be the mac address of the host computer that is sent to the route, and I do not know which one to use with me.Centos is a virtual machineWhether it is relevant, and if so, whether there is a good way to solve this problem. Thank you very much

After experiments, there is no problem in using pipwork on the physical machine. . . . . However, if any Daniel can solve this problem in the virtual machine, he still hopes to give more advice.