Tags down


Changing Redis port in Docker Compose not working

By : Joshua Dula
Date : October 16 2020, 06:10 AM
it helps some times The answer of @Mihai helpt me figure out the solution. I needed to change the port Redis is running on as well as the exposed port. This is the working Docker compose file.
code :
version: '3.7'
    container_name: redis
    hostname: redis
    image: sameersbn/redis:4.0.9-2
    command: --port 6380
      - "6380:6380"
      - "6380"
      - type: volume
        source: redis-data
        target: /data
    restart: always
    container_name: redis-commander
    hostname: redis-commander
    image: rediscommander/redis-commander:latest
    restart: always
      - REDIS_HOSTS=local:redis:6380
      - "8082:8081"
  redis-data: {}

Share : facebook icon twitter icon

Changing a postgres containers server port in Docker Compose

By : Gero
Date : March 29 2020, 07:55 AM
like below fixes the issue I'm assuming postgres is running on port 5432 in the container and you want to expose it on the host on 5433.
Use this in the ports strophe:
code :

How can I specify an Alternate Exposed Port for Redis / RethinkDB (using Docker Compose)?

By : zezo
Date : March 29 2020, 07:55 AM
it should still fix some issue Ok. So I was able to solve this, it seems like there may be a bug with how official rethinkDB and Redis containers handle port forwarding since the normal port:"XXXXX:YYYYY" YAML specification is disregarded and the traffic is not sent from the modified host port to the standard docker port.
The solution was to modify the Command used to start Redis / RethinkDB containers to use the command line ports flag (which differs for each system) to change to my alternate port.
code :
version: "2"


    image: some-node-container
    container_name: cheapotle
      - "5200:5200" #both numbers must match CHEAPOTLE_PORT env variable for the cheapotle service
      - redis
      - rethinkdb
      - ./:/app
      - CHEAPOTLE_PORT=5200 #must match cheapotle service ports above.
      - RETHINKDB_PORT=28016 #must match rethinkdb service->ports below.
      - REDIS_PORT=6380 #must match redis service ->ports below.
      - RESQUE_PORT=9292
    entrypoint: foreman start -f /app/src/Procfile

    image: redis:3.2-alpine
    container_name: redis_cheapotle
      - "6380:6380" #both numbers must match port in command below AND REDIS_PORT cheapotle service variable
    command: redis-server --port 6380 #must match above ports AND REDIS_PORT cheapotle service variable

    image: rethinkdb  
    container_name: rethinkdb_cheapotle
      - "28016:28016" #The both numbers must match the RETHINKDB_PORT in environment variables for cheapotle above + command below.  You must change allor none, they must always be the same.
      - "8090:8080" #this is where you will access the RethinkDB admin. If you have something on 8090, change the port to 8091:8080
    command: rethinkdb --driver-port 28016 --bind all #must match above ports AND REDIS_PORT cheapotle service variable

Host port mapping not working with docker-compose on EC2

By : Whitefang57
Date : March 29 2020, 07:55 AM
this one helps. As it works with port 80 and doesn't work with port 5106 it could mean one of two possibilities:
There is an issue with your security groups. You should check you have added port 5106 in your inbound rules of your security group. There is an issue with a firewall or antivirus that doesn't allow you to connect to web pages in different ports rather than 80 or 443. You may try if this happens with another device or on another network.

Changing port in docker-compose.yml

By : K.King
Date : March 29 2020, 07:55 AM
seems to work fine You should change the external port only (the first port number in xxxx:xxxx)

Docker compose port forwarding not working properly

By : c3Zor
Date : March 29 2020, 07:55 AM
like below fixes the issue Try to delete all networks you created, like this:
docker network rm $(docker network ls -q)
Related Posts Related Posts :
  • how to run docker-compose.yaml on kubernetes?
  • Will changing the Linux hostname of a Docker Swarm manager cause it to lose its Swarm Manager status?
  • Why I cannot deploy my app to docker successfully
  • .net core console application using TopShelf
  • How to restrict that a docker container only listens connection from localhost?
  • Error running docker build for arm32v7 container on amd64 linux machine: standard_init_linux.go:207
  • How run jboss-cli on start docker container with Dockerfile
  • Docker volume backup error: Tar: MYCONTAINER_VOLUME: Cannot stat: No such file or directory
  • Translate docker run into subcomponents
  • Why is my Kubernetes deployment registering as unavailable even though it runs in Docker?
  • ForwardAuth Middleware is not working in Traefik as API Gateway
  • Unable to get my Docker image's base image
  • Default IP of AWS Codebuild
  • Kubernetes - Private Repository deployment issue
  • How do I configure my docker container to run in the browser?
  • Starting docker container results in docker-credential-secretservice: The connection is closed
  • How to Configure Kubeconfig based login in Kubernetes Dashboard
  • Access a Caddy server by IP
  • Does Docker swarm ignore VOLUME commands from Dockerfiles?
  • Kubernetes resource request/limit values
  • How to write commands with multiple lines in Dockerfile
  • How to start the stopped ubuntu container in docker? (ran without options (-i - t) )
  • Traefik middle-wares are not working with docker compose
  • Configure docker run to use ssl / https / tls
  • How to diagnose ECS Fargate task failing to start?
  • The Compose file './docker-compose.yml' is invalid because: Unsupported config option
  • Setting up Traefik with Cloudflare
  • Cassandra/Scylla on docker without internet in linux server
  • Websphere Liberty running on Docker with Open JDK 11
  • /bin/sh: 1: sudo: not found when running dockerfile
  • Persist ENV vars across multi-stage Docker builds
  • Copy text file from docker container to host
  • How to roll back a deployment to a previous revision automatically when deployment has crossed 'progressDeadlineSeconds'
  • I can't run Docker ToolBox on Windows 7
  • Can we spawn more containers from existing one in a pod?
  • How To Mount Directory Of Conainter Into Another After containers are run?
  • Kubernetes equivalent of 'docker run -it'
  • Docker Hub Registry cannot build docker image from Github repository
  • How to install tool in alpine docker
  • Is there a way to restrict container access for user in Docker?
  • What is the difference between devel and runtime tag for a Docker container?
  • no matching manifest for windows/amd64
  • Failed to pull dockerhub image on Kubernetes
  • How to run a Dockerfile locally on a Windows 10 machine?
  • Using multi-line value in .env file in docker-compose
  • Permissions on Volume files created by Docker
  • Nginx caching DNS look ups and ignoring my resolver settings
  • Database synchronization time in cassandra
  • How to restore original client IP from Cloudflare with NGINX ingress controller
  • My kafka docker container cannot connect to my zookeeper docker container
  • How to build a new app from scratch inside a docker container?
  • trigger event when a pod is created or deleted in kubernetes to write or delete its IP in some database
  • tar (child): prometheus-2.8.1.linux-amd64.tar.gz: Cannot open: No such file or directory
  • Mount Current Directory in Containrer using docker file
  • Error occurring during the signature verification of apt-get update
  • Error: cannot find automatically a registry where to push images - Kamel Kubernetes
  • Run Apache Ignite in Docker container as non-root user
  • Elixir requests slow in docker with phoenix code reloader on
  • Side Effects When Using fluentd logging driver with Docker
  • How to kill a docker container when it reaches set of memory usage or CPU limit
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk