Docker-Compose doesn't build correct version

It doesn’t seem to matter what version I specify in docker-compose.yml, I always seem to get dgraph version 1.0.8. I have tried, “dgraph/dgraph:latest”, “dgraph/dgraph:master”, and “dgraph/dgraph:v1.2.1”
I’ve tried --force-recreate, the images seem to rebuild but when I go in the container and run dgraph I see v1.0.8.


docker pull dgraph/dgraph

or use “docker prune” and try again.

Thank you. Just tried that. It’s “docker container prune”.
Also deleted the database files from the s3fs storage. Thought it might be a volumes thing.
So far no luck. I go “docker-compose up”. Then “exec” into the alpha server.
Try “dgraph” get:

Dgraph version : v1.0.14
Commit SHA-1 : 26cb2f94
Commit timestamp : 2019-04-12 13:21:56 -0700
Branch : HEAD
Go version : go1.11.5

I’ll try something else. Maybe have to prune images not containers? Will try.

You have to prune everything just to make sure. Prune volumes, containers, images.

But this is really weird. Never saw happening in any image build either Dgraph or other application.

Also, make sure you’re not running Dgraph binaries locally.

Got it now. I had some straggling images I had to prune. Also had to change the version in docker-compose.yml from “2” to “3.2”. Not sure if that’s what made the difference but I got it working. Thanks for the clues, MichelDiz! :slight_smile: