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

  • folder permissions docker-osx-dev
  • Extend docker postgres image to create extra database
  • “Docker-compose up” does not pull images everytime , it recreates a pulled image
  • Install Docker in container for use by GitLab CI build
  • How to set Docker's system memory?
  • Generating dockerfile of a gradle java application
  • Docker's healthcheck on Windows container and exit code (“||” linux equivalent)
  • How to serve Docker containers with Nginx if there are multiple sites on one host?
  • run maven build on gitlab.com with eirslett:frontend-maven-plugin
  • Update hosts file in all containers
  • Docker container can't ping out side of network
  • `foxx-manager update` fails inside corporate proxy environment
  • 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.