Change floats to ints recursively on env encoding

Fixes #6246
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Merge pull request #6659 from vieux/pr_6248

Change floats to ints recursively on env encoding