Behebung von 'Configuring tzdata' interaktiver Eingabe beim Erstellen von Docker-Images
English
Deutsch
Oftens, wenn du deb-Pakete in deinem Dockerfile installierst, werden einige Pakete tzdata als Abhängigkeit installieren.
Der tzdata-Installer wird versuchen, dich interaktiv nach deinem Standort zu fragen, indem er
tzdata_docker_fix.txt
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:Dies wird deinen Image-Build blockieren.
Um dies zu beheben, müssen wir die tzdata-Aufforderung nicht interaktiv machen.
Die bevorzugte Methode ist, hinzuzufügen
dockerfile_env_debian_frontend.sh
ENV DEBIAN_FRONTEND=noninteractivevor den ersten RUN-Anweisungen in deinem Dockerfile.
Alternativ kannst du nur den apt install- oder apt-get install-Befehl mit DEBIAN_FRONTEND=noninteractive ausführen:
dockerfile_run_tzdata.sh
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdataDies wird automatisch eine Standardkonfiguration für tzdata auswählen.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow