Giter VIP home page Giter VIP logo

ansible-lab-environment-in-containers's Issues

Docker Compose Port Conflict and Service Replica Issues in Ansible Lab Environment

Description

I am encountering issues with my Docker Compose setup for an Ansible lab environment. Specifically, there are port conflicts when running multiple replicas of a service, and difficulties with fixed host port assignments for these replicas.

Environment

  • Docker version: 24.0.7
  • Docker Compose version: 1.29.2,
  • OS: ubuntu 22.04

Steps to Reproduce

  1. Run docker-compose up -d with the following Docker Compose configuration:

Error message

`bash
Creating alpinesystemd-example-com ...
WARNING: The "managedhost-alpine" service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.
Creating alpinesystemd-example-com ... done
Creating centos7-example-com ...
Creating centos7-example-com ... done
Creating ansible-lab-environment-in-containers_controlnode_1 ...
Creating ansible-lab-environment-in-containers_managedhost-alpine_1 ... done
Creating ansible-lab-environment-in-containers_managedhost-alpine_2 ...
Creating ansible-lab-environment-in-containers_managedhost-alpine_2 ... error
WARNING: Host is already in use by another container
Creating ansible-lab-environment-in-containers_managedhost-redhat-base_1 ... done

Creating rhel8-example-com ... done_managedhost-alpine_3 (0b10325726bc3a1231eab82fc08f09bb5e235baa6acfc001a4ea37c601d2c471): Bind for 0.0.0.0:3001 failed: port is already allocated

ERROR: for ansible-lab-environment-in-containers_managedhost-alpine_2 Cannot start service managedhost-alpine: driver failed programming external connectivity on endpoint ansible-lab-environment-in-containers
Creating ansible-lab-environment-in-containers_controlnode_1 ... done

ERROR: for managedhost-alpine Cannot start service managedhost-alpine: driver failed programming external connectivity on endpoint ansible-lab-environment-in-containers_managedhost-alpine_3 (0b10325726bc3a1231eab82fc08f09bb5e235baa6acfc001a4ea37c601d2c471): Bind for 0.0.0.0:3001 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.