Don't try to add a static IP to a docker container. Docker containers are meant to be stopped and started frequently and everytime they will have a new IP address. Furthermore, one containerized application can be scaled up and down by changing the number of container instances from the same image. Therefore a static IP won't make sense. The Docker daemon has a built in DNS that makes sure that you can target your containers by referring to them by their container name. For example:
docker run -d -p 8080:80 --name <custom_container_name> <image>
Then you can reference the container via it's name:
ping <custom_container_name>:8080