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: {}
Related
I have configured the drupal docker container along with the webserver using below-mentioned steps on rhel 8 server using podman docker.
My docker-compose file:
version: "3"
services:
drupal:
image: drupal:9.2.7-php8.0-fpm-alpine
container_name: drupal
restart: unless-stopped
networks:
- internal
- external
webserver:
image: nginx:1.21.3
container_name: webserver
depends_on:
- drupal
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./drupal-data:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
networks:
- external
networks:
external:
driver: bridge
internal:
driver: bridge
volumes:
drupal-data:
db-data:
If I enter commands manually on the server end, I get the correct response properly but Can't get any response from the browser.
As below response getting from server end,
Could you please suggest the solution for this issue why didn't get any response on the browser, and how to fix this issue?
i am trying to bind container with nginx to ip 172.16.238.10 , but for some reason docker ignores settings in docker-compose
#my docker-compose file
version: "3.9"
services:
nginx:
build: nginx/
ports:
- 80:80/tcp
volumes:
./dokcer/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
./dokcer/nginx/conf/hosts:/etc/hosts
./docker/project:/var/www/project
networks:
app_net:
ipv4_address: 172.16.238.10
php-fpm:
build: php-fpm/
ports:
- 9000:9000/tcp
volumes:
./dokcer/php-fpm/conf/www.conf:/usr/local/etc/php-fpm.d/www.conf
./dokcer/php-fpm/conf/hosts:/etc/hosts
./dokcer/project:/var/www/project
networks:
app_net:
ipv4_address: 172.16.238.11
networks:
app_net:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
after build and launch, I look at the docker_app_net network and see that the nginx container has ip 172.16.238.2 although I expected it to be 172.16.238.10.
what could be the problem? I will be grateful for every answer because I am confused :c
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.
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
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!