-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure build steps use non-interactive package installs. #593
Conversation
Fixes cross-rs#589. Some libraries, such as `tzdata`, can ask for user input during installation, which is problematic when building a Docker image, since it prevents automatation and stdin i typically not attached. This has also been an issue upgrading Docker images to the latest Ubuntu versions.
Does it make sense to set this in |
That should work, I'll redo this PR then. Seems like a much "drier" approach. One of the issues though is it's not only the command
And a lot of the Dockerfiles, such as So I'm not sure what the best solution is here. |
Currently, merely updating --- a/docker/lib.sh
+++ b/docker/lib.sh
@@ -6,7 +6,8 @@ install_packages() {
for pkg in "${@}"; do
if ! dpkg -L "${pkg}" >/dev/null 2>/dev/null; then
- apt-get install --assume-yes --no-install-recommends "${pkg}"
+ DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes \
+ --no-install-recommends "${pkg}"
purge_list+=( "${pkg}" )
fi Here, we have the failing step of RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
crossbuild-essential-armel \
libc6-dev-armel-cross && \
/qemu.sh arm We could export this only in Dockerfiles that currently require non-interactive
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
593: Ensure build steps use non-interactive package installs. r=Emilgardis a=Alexhuszagh Fixes #589. Some libraries, such as `tzdata`, can ask for user input during installation, which is problematic when building a Docker image, since it prevents automatation and stdin i typically not attached. This has also been an issue upgrading Docker images to the latest Ubuntu versions. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
Build failed: |
oh yeah, need someone else to r+ #690 |
bors r+ |
593: Ensure build steps use non-interactive package installs. r=Emilgardis a=Alexhuszagh Fixes #589. Some libraries, such as `tzdata`, can ask for user input during installation, which is problematic when building a Docker image, since it prevents automatation and stdin i typically not attached. This has also been an issue upgrading Docker images to the latest Ubuntu versions. 688: Bump `cmake` to version `3.23.1` r=Emilgardis a=Jules-Bertholet Co-authored-by: Alex Huszagh <ahuszagh@gmail.com> Co-authored-by: Jules Bertholet <jules.bertholet@gmail.com>
Build failed (retrying...): |
593: Ensure build steps use non-interactive package installs. r=Emilgardis a=Alexhuszagh Fixes #589. Some libraries, such as `tzdata`, can ask for user input during installation, which is problematic when building a Docker image, since it prevents automatation and stdin i typically not attached. This has also been an issue upgrading Docker images to the latest Ubuntu versions. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
bors cancel |
Canceled. |
bors r+ |
Build succeeded: |
Fixes #589. Some libraries, such as
tzdata
, can ask for user inputduring installation, which is problematic when building a Docker image,
since it prevents automatation and stdin i typically not attached. This
has also been an issue upgrading Docker images to the latest Ubuntu
versions.