How to use Docker Remote API to assign a static IP address to a container

When I use Docker Remote API to create a container, I don’t know how to assign a IP address because I don’t find the parameter about it.So how can I use Docker Remote API to create a container with a static IP address?

My Docker Server&Client version is 1.10.3, and API version is 1.22

  • JRebel & Docker bean initializing error
  • Running docker on Ubuntu: mounted host volume is not writable from container
  • How Can I Run A Command That Does Not Exit Upon Failure Until It Succeeds?
  • xhost command for docker GUI apps (Eclipse)
  • Does anyone know a workaround for no-new-privileges blocking selinux transitions in docker?
  • Logging to STDOUT in a ruby program (not working in Docker)
  • Passing or setting password parameter to mercurial during docker build
  • Copy all project. Docker file command
  • Accessing Docker containers and KVM VMs through VPN
  • How to see the output of a service in a docker stack?
  • Windows Server 2016 docker image default username/password
  • trouble with running e2e on bitbucket pipeline
  • One Solution collect form web for “How to use Docker Remote API to assign a static IP address to a container”

    This API will let you set a V4 and/or V6 static IP

    POST /networks/(id)/connect

    https://docs.docker.com/engine/reference/api/docker_remote_api/#v1-22-api-changes

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.