I want to install awscli onto my ubuntu docker image.
This is the command I used
apt-get install -y awscli
Shortly after the installation commenced, it prompted
Configuring tzdata
Please select the geographic area in which you live. Subsequent
configuration questions will narrow this down by presenting a list of
cities, representing the time zones in which they are located.
- Africa 2. America 3. Antarctica 4. Australia 5. Arctic 6. Asia 7. Atlantic 8. Europe 9. Indian 10. Pacific 11. SystemV 12.
US 13. Etc Geographic area:
Since I want to include this apt-get
step in Docker, it cannot be interactive.
How can I pass this timezone info to apt-get
and/or aws-cli
?
I have tried to set the content of '/etc/timezone' to Australia/Sydney
, but the prompt still comes up. If I kill the process at this point, I can see the content of the file '/etc/timezone' is changed to Etc/UTC
Best Answer
Add the following line to a aws configuration file (e.g.
/root/.aws/credentials
) before runningpip install awscli
Of course you should set the region to whatever makes sense for your project.