How do i assign static ip address to each container in the docker-compose file.
error: Creating network "dockercompose7405404752525846881_app_net" with driver "default"plugin not found.
The solusion has two projects, a web front-end and a web-api back-end. The back-end is accessed through angular.js
Project builds and runs out side of docker, and runs inside docker.
The problem is i need to set static ipaddress in the docker-compose file so i can manage the compunication between the frontend and backend (remebering it's angular that needs to know the ip of the webapi).
This is my sanitised docker-compose file:
version: '2.1'
services:
backend.api:
image: backend.api
ports:
- "80:80"
build:
context: .\backend.API
dockerfile: Dockerfile
networks:
app_net:
ipv4_address: 111.111.1.200
frontend:
image: frontend
env_file:
- .\frontend\config.env
ports:
- "80:80"
build:
context: .\frontend
dockerfile: Dockerfile
networks:
app_net:
ipv4_address: 111.111.1.210
networks:
app_net:
driver: default
ipam:
driver: default
config:
- subnet: 111.111.1.0/24
The error msg I'm getting is as follows:
Creating network "dockercompose7405404752525846881_app_net" with driver "default"plugin not found.
I have tried version 3 ver 2 and ver 2.1