我想在一个使用Ubuntu 16.04镜像的Docker环境中安装certbot:
例如:
当我在容器内部时,安装Certbot的最直接方法无法使用,因为它需要用户干预。
问题出在
很奇怪,当我在添加ppa之前安装tzdata时,它就能正常工作。
问题:
- 在添加ppa之前或之后安装tzdata有什么区别? - 是否有更好的方法来避免在安装certbot时出现交互对话框?
例如:
docker run -it ubuntu:16.04 /bin/bash
当我在容器内部时,安装Certbot的最直接方法无法使用,因为它需要用户干预。
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y -u ppa:certbot/certbot && \
apt-get install -y certbot
问题出在
tzdata
上,它会停下来并弹出这个交互式的对话框:Extracting templates from packages: 100%
Preconfiguring packages ...
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.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area:
很奇怪,当我在添加ppa之前安装tzdata时,它就能正常工作。
apt-get update && \
apt-get install -y tzdata && \
apt-get install -y software-properties-common && \
add-apt-repository -y -u ppa:certbot/certbot && \
apt-get install -y certbot
问题:
- 在添加ppa之前或之后安装tzdata有什么区别? - 是否有更好的方法来避免在安装certbot时出现交互对话框?