docker compose issue on windows 10 - docker

I have an opensource project cloned, and it has docker-compose.yml.
I execute
docker-compose up
But I see error:
ERROR: could not find plugin bridge in v1 plugin registry: plugin not found
I even tried a commonly mentioned solution on SO:
docker network create --driver nat network-name
But issue still persists.
I understand that docker-compose is part of docker desktop install on windows.
How to solve it?
Content of the file:
version: "3"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
ports: ["9200:9200"]
networks: ["sandbox"]
environment: ["discovery.type=single-node"]
kibana:
image: docker.elastic.co/kibana/kibana:6.7.0
ports: ["5601:5601"]
networks: ["sandbox"]
depends_on: ["elasticsearch"]
logstash:
image: docker.elastic.co/logstash/logstash:6.7.0
volumes:
- ./config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
networks: ["sandbox"]
ports: ["5000:5000/udp"]
depends_on: ["elasticsearch"]
grafana:
image: grafana/grafana:6.0.2
volumes: ["./grafana/plugins/cinnamon-elasticsearch-app:/var/lib/grafana/plugins/cinnamon-elasticsearch-app"]
ports: ["3000:3000"]
networks: ["sandbox"]
depends_on: ["elasticsearch"]
networks:
sandbox:
driver: bridge

Related

docker-compose: service "gateway" refers to undefined volume ${PWD}/config/gateway/gateway-configuration.ini: invalid compose project

My goal: generate docker-compose.yaml from docker-compose.yaml and docker-compose.override.yaml and keep the variables as they are now = without interpolate
I've tried to run
docker compose -f docker-compose.yaml -f docker-compose.override.yaml convert --no-interpolate > new-docker-compose.yaml
Here is my docker-compose.yaml:
version: "3.5"
services:
redis-db:
image: redislabs/rejson:2.0.11
container_name: redis-db
restart: unless-stopped
volumes:
- redis-storage-vol:/data
- ${PWD}/config/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
ports:
- 6379:6379
runner:
image: "${REPO}/runner/${RUNNER_CPU_IMAGE}:${RUNNER_CPU_TAG}"
container_name: runner
restart: unless-stopped
volumes:
- data-storage-vol:/data
- ${PWD}/config/runner/runner-configuration.ini:/configuration.ini:ro
- "${PWD}/solutions/${ALGO}:/home/scripts/algorithmic_solutions_list.txt:ro"
depends_on:
- "redis-db"
gateway:
image: "${REPO}/gateway/gateway-server:${GATEWAY_TAG}"
container_name: gateway
restart: unless-stopped
volumes:
- data-storage-vol:/data
- ${PWD}/config/gateway/gateway-configuration.ini:/configuration.ini:ro
ports:
- 8000:8000
depends_on:
- "redis-db"
volumes:
data-storage-vol:
driver_opts:
type: "tmpfs"
device: "tmpfs"
o: "size=5g,uid=1000"
redis-storage-vol:
driver: local
docker-compose.override.yaml
version: "3.5"
services:
runner:
image: "${REPO}/runner/${RUNNER_GPU_IMAGE}:${RUNNER_GPU_TAG}"
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [ GPU ]
What I've tried:
Run docker compose convert without flag --no-interpolate, it worked well but the variables was populated.
Run like the example - but got this error:
service "gateway" refers to undefined volume ${PWD}/config/gateway/gateway-configuration.ini: invalid compose project
I want to keep using docker compose commands and not edit files after its created.

Docker container has no network

I have the following docker-compose.yml file:
version: '3.7'
services:
chrome:
image: "image1:v0-1-1"
restart: "no"
networks:
- internal
grpc:
image: "image2:v0-1-1"
restart: "no"
networks:
- internal
depends_on:
- chrome
networks:
internal:
name: internal
# driver: bridge
After running docker-compose up -d --remove-orphans grpc container (image2) has none network, but chrome container (image1) has internal network.
I have faced this strange issue for the first time. What is the problem?
I have the latest version of docker and docker-compose.
Your compose file should be like this try this
version: '3.7'
services:
chrome:
image: "image1:v0-1-1"
restart: "no"
networks:
- internal
grpc:
image: "image2:v0-1-1"
restart: "no"
networks:
- internal
depends_on:
- chrome
networks:
internal: {}

Unsupported config option for services.networks: 'my_network'

I am having below error while running the docker-compose file.
I have created a bridge network with name my_network
Unsupported config option for services.networks: 'my_network'
docker-compose.yml
version: '3.3'
services:
webapp1:
image: nginx:latest
container_name: my_container
ports:
- "8080:8080"
networks:
- my_network
volumes:
- /home/ajay/nginx:/www/data
That seems docker-compose configuration issue, use below docker-compose file, it will create a network and then you can use the same network in the docker-compose file.
version: '3.5'
services:
webapp1:
image: nginx:latest
container_name: my_container
ports:
- "8080:80"
networks:
- my_network
networks:
my_network:
driver: bridge
Also Nginx port should be 80 inside the container if you did not modify the default configuration.

Docker does not support storing secrets on Windows home system using Docker toolbox

Using Docker toolbox on Windows 10 Home, Docker version 19.03, we have created a docker-compose.yml and added a secrets file as JSON, it runs fine on a Mac system, but it is unable to run the same in Windows 10 Home.
Error after running docker-compose up:
ERROR: for orthancserver Cannot create container for service orthanc: invalid mount config for type
"bind": invalid mount path: 'C:/Users/ABC/Desktop/Project/orthanc.json' mount path must be absolute
docker-compose.yml:
version: "3.7"
services:
orthanc:
image: jodogne/orthanc-plugins:1.6.1
command: /run/secrets/
container_name: orthancserver
restart: always
ports:
- "4242:4242"
- "8042:8042"
networks:
- mynetwork
volumes:
- /tmp/orthanc-db/:/var/lib/orthanc/db/
secrets:
- orthanc.json
dcserver:
build: ./dc_node_server
depends_on:
- orthanc
container_name: dcserver
restart: always
ports:
- "5001:5001"
networks:
- mynetwork
volumes:
- localdb:/database
volumes:
localdb:
external: true
networks:
mynetwork:
external: true
secrets:
orthanc.json:
file: orthanc.json
orthanc.json file kept next to docker-compose.yml
Found an alternative solution for windows 10 home, with docker toolbox. as commented by #Schwarz54, the file-sharing works well with docker volume for Dockerized Orthanc server.
Add shared folder:
Open Oracle VM manager
Go to setting of default VM
Click Shared Folders
Add C:\ drive to the list
Edit docker-compose.yml to transfer the config file to Orthanc via volume
version: "3.7"
services:
orthanc:
image: jodogne/orthanc-plugins:1.6.1
command: /run/secrets/
container_name: orthancserver
restart: always
ports:
- "4242:4242"
- "8042:8042"
networks:
- mynetwork
volumes:
- /tmp/orthanc-db/:/var/lib/orthanc/db/
- /c/Users/ABCUser/Desktop/Project/orthanc.json:/etc/orthanc/orthanc.json:ro
dcserver:
build: ./dc_node_server
depends_on:
- orthanc
container_name: dcserver
restart: always
ports:
- "5001:5001"
networks:
- mynetwork
volumes:
- localdb:/database
volumes:
localdb:
external: true
networks:
mynetwork:
external: true

Re-route backend routes between containers within the same host

Hi I'm new to docker containers. I have the following setup:
The docker host is running on a Linux server, it is running 4 apps:
reverse-proxy (nodejs-based)
frontend container
backend container
active mq container
All of them are running in my-network
Here is the problem, I would like to re-route every urls that come into the reverse-proxy to where it suppose to be. And restriction is I can't use re-write the reverse-proxy, because it is not worthy to re-write
The following are the docker-compose.yml files
version: '3'
services:
backend:
image: tomcat/test:first
ports:
- "8080:8080"
networks:
- my-network
volumes:
- "/home/lluo/app/myApp/target/MyApp/WEB-INF/classes/META-INF/config:/usr/local/tomcat/conf/myApp-configuration/"
depends_on:
- active_mq
active_mq:
image: active_mq/test:first
ports:
- "24043:24043"
networks:
- my-network
networks:
my-network:
external: true
version: '3'
services:
reverse_proxy:
container_name: proxy_container
image: reverse/proxy:docker
ports:
- "0.0.0.0:15009:15009"
networks:
- my-network
networks:
my-network:
external: true
version: '3'
services:
frontend:
image: template/frontend:after_merge_develop
container_name: fe_container
ports:
- "3000:3000"
networks:
- my-network
volumes:
- "/home/lluo/config.json:/app/dist/config.json"
networks:
my-network:
external: true
And I bind the network ipv4_address to be 0.0.0.0
Please help me resolve this issue, it's been days.
Thank you very much!

Resources