Skip to content

Fix missing confirmation in apt-upgrade in Docker build#711

Merged
juhoinkinen merged 1 commit into
mainfrom
fix-missing-confirmation-in-apt-upgrade-in-dockerfile
Jun 7, 2023
Merged

Fix missing confirmation in apt-upgrade in Docker build#711
juhoinkinen merged 1 commit into
mainfrom
fix-missing-confirmation-in-apt-upgrade-in-dockerfile

Conversation

@juhoinkinen

Copy link
Copy Markdown
Member

apt-get upgrade was added in Docker build to ensure that system packages are up-to-date in the image in PR #707, but I did not add -y option to it, because it seemed unnecessary as the command worked while testing without it (and in this SO post the -y was concluded to be unnecessary, but the post was about apt-get update!)

However, it seems that when there is some packages to upgrade, then then the -y option is necessary. Without it the build fails:

#5 2.944 Calculating upgrade...
#5 3.091 The following packages will be upgraded:
#5 3.091   libssl1.1 openssl
#5 3.094 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#5 3.094 Need to get 2413 kB of archives.
#5 3.094 After this operation, 4096 B disk space will be freed.
#5 3.094 Do you want to continue? [Y/n] Abort.
------
ERROR: failed to solve: executor failed running [/bin/bash -c apt-get update && apt-get upgrade && 	if [[ $optional_dependencies =~ "voikko" ]]; then 		apt-get install -y --no-install-recommends 			libvoikko1 			voikko-fi; 	fi && 	apt-get install -y --no-install-recommends rsync && 	rm -rf /var/lib/apt/lists/* /usr/include/*]: exit code: 1
Error: buildx failed with: ERROR: failed to solve: executor failed running [/bin/bash -c apt-get update && apt-get upgrade && 	if [[ $optional_dependencies =~ "voikko" ]]; then 		apt-get install -y --no-install-recommends 			libvoikko1 			voikko-fi; 	fi && 	apt-get install -y --no-install-recommends rsync && 	rm -rf /var/lib/apt/lists/* /usr/include/*]: exit code: 1

@juhoinkinen juhoinkinen added this to the 1.0 milestone Jun 7, 2023
@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov

codecov Bot commented Jun 7, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +3.85 🎉

Comparison is base (579701c) 95.81% compared to head (7762fe6) 99.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #711      +/-   ##
==========================================
+ Coverage   95.81%   99.67%   +3.85%     
==========================================
  Files          89       89              
  Lines        6380     6380              
==========================================
+ Hits         6113     6359     +246     
+ Misses        267       21     -246     

see 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@juhoinkinen juhoinkinen merged commit 31ef59d into main Jun 7, 2023
@juhoinkinen juhoinkinen deleted the fix-missing-confirmation-in-apt-upgrade-in-dockerfile branch June 7, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant