Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong redis version used #139

Closed
kristof-kasa opened this issue Jul 13, 2022 · 3 comments
Closed

Wrong redis version used #139

kristof-kasa opened this issue Jul 13, 2022 · 3 comments

Comments

@kristof-kasa
Copy link

kristof-kasa commented Jul 13, 2022

Environment

  • docker-redis-cluster version: 6.0.10
  • redis-server version: 6.0.10
  • git hash (If applicable): latest
  • CLI command used to build the container: docker-compose up --build redis-cluster

Steps to Reproduce

I have the following Dockerfile and docker-compose file.

# Dockerfile.redis
FROM grokzen/redis-cluster
version: '3.8'
services:
  redis-cluster:
    build:
      context: .
      dockerfile: ./Dockerfile.redis
      args:
        - redis_version=6.2.0
    environment:
      - INITIAL_PORT=7000
      - MASTERS=3
      - SLAVES_PER_MASTER=1
      - IP=0.0.0.0
    ports:
     - 7000-7005:7000-7005

After the docker-compose build command I ssh into the container I got redis version 6.0.1 instead of 6.2.0

root@e4bc4c9006af:/data# redis-server --version
Redis server v=6.0.1 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=0

Expected Behavior

When I run redis-server --version inside the container I should get 6.2.0

Observed Behavior

I got back 6.0.1 instead of 6.2.0

@Grokzen
Copy link
Owner

Grokzen commented Jul 13, 2022

@kristof-kasa You are using the args value wrong. Please reference the example file in the repo for exact syntax https://github.com/Grokzen/docker-redis-cluster/blob/master/docker-compose.yml

It should be

    build:
      context: .
      args:
        redis_version: '6.2.0'

@Grokzen Grokzen closed this as completed Jul 13, 2022
@kristof-kasa
Copy link
Author

Still the same issue sadly.

@Grokzen
Copy link
Owner

Grokzen commented Jul 13, 2022

What versions of docker compose and docker are you running? There is no issue on my end running this with the args i specified. Are you really sure you are running the same build that you built? If you rebuild the image, look in the stdout on the step where it downloads from redis if it uses the redis version you specify or if it downloads anything else. Also note that if it would not be using the variable you specify then it should download latest 6.2 release so you even getting the wrong major version makes even less sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants