I want to display the latest tag of my app's docker image on the frontend of my django application so that the users see the same app version as tagged in the docker image. Any ideas on how to achieve this?
Asked
Active
Viewed 251 times
1
-
You may try to assign it to an environment variable and use the variable inside Django. – Harun Yilmaz Sep 16 '20 at 12:12
1 Answers
2
Reading the tag from inside a container is not that straight-forward.
But I recommend sending it as a build-arg
to the container environment when building the image.
docker build --build-arg TAG=v0.0.1 .
Also see: Accessing tag as an environment variable inside a Docker container

dVeza
- 557
- 4
- 12