Many docker images don't come with vi or nano installed, and often you need to edit a file quick. Instead of installing a package use SED to insert a line or two.
# if you want to add it after the line containing DEBUG =
sed -i '/DEBUG =/a ENABLE_API_TOKENS = True' filename