Skip to content
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

go-ci-stable, go-ci-oldstable and go-ci-unstable images missing file program #1636

Closed
atc0005 opened this issue Jul 25, 2024 · 0 comments · Fixed by #1637
Closed

go-ci-stable, go-ci-oldstable and go-ci-unstable images missing file program #1636

atc0005 opened this issue Jul 25, 2024 · 0 comments · Fixed by #1637
Assignees
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jul 25, 2024

Overview

From a CodeQL run on a project which uses the go-ci-stable container image from this project:

Failed to determine the location of the Go binary: FileCmdNotFoundError: The file program is required, but does not appear to be installed. Please install it: Error: Could not find program file on PATH.

Because I intend to continue using the go-ci-stable image for CodeQL jobs (to provide the latest stable Go version) I should add file to this image (and go-ci-oldstable and go-ci-unstable images for parity).

Reproduce problem

Sure enough, the file program is missing.

$ podman container run --platform linux/amd64 --rm -it ghcr.io/atc0005/go-ci:go-ci-stable
Trying to pull ghcr.io/atc0005/go-ci:go-ci-stable...
Getting image source signatures
Copying blob c363784b64c5 skipped: already exists
Copying blob 58b365fa3e8d skipped: already exists
Copying blob e9aef93137af skipped: already exists
Copying blob d214e0973057 skipped: already exists
Copying blob 3dbed71fc544 skipped: already exists
Copying blob 32a2f51ff3dd skipped: already exists
Copying blob 4f4fb700ef54 skipped: already exists
Copying blob 3d84bcc6220c skipped: already exists
Copying blob aa5ecf50c913 skipped: already exists
Copying blob 679fd2e55d06 skipped: already exists
Copying blob dc519040296e skipped: already exists
Copying blob 58ec23ea033a skipped: already exists
Copying blob d9e51455cbd2 skipped: already exists
Copying blob ba7ee9847f96 skipped: already exists
Copying blob bc42ffa3f59c skipped: already exists
Copying blob ec9b5c2c87de skipped: already exists
Copying blob 3b68e92a6c7f skipped: already exists
Copying blob 55ddcff14ea2 skipped: already exists
Copying blob 725a205a5c1f skipped: already exists
Copying blob de97788ff0ae skipped: already exists
Copying config df1728a5f0 done
Writing manifest to image destination
Storing signatures

root@b880ad41cfed:/go# file
bash: file: command not found

root@b880ad41cfed:/go# apt-get update && apt-get install file
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [169 kB]
Fetched 9225 kB in 2s (4138 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libmagic-mgc libmagic1
The following NEW packages will be installed:
  file libmagic-mgc libmagic1
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 451 kB of archives.
After this operation, 8644 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 libmagic-mgc amd64 1:5.44-3 [305 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libmagic1 amd64 1:5.44-3 [104 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 file amd64 1:5.44-3 [42.5 kB]
Fetched 451 kB in 1s (635 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libmagic-mgc.
(Reading database ... 15652 files and directories currently installed.)
Preparing to unpack .../libmagic-mgc_1%3a5.44-3_amd64.deb ...
Unpacking libmagic-mgc (1:5.44-3) ...
Selecting previously unselected package libmagic1:amd64.
Preparing to unpack .../libmagic1_1%3a5.44-3_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.44-3) ...
Selecting previously unselected package file.
Preparing to unpack .../file_1%3a5.44-3_amd64.deb ...
Unpacking file (1:5.44-3) ...
Setting up libmagic-mgc (1:5.44-3) ...
Setting up libmagic1:amd64 (1:5.44-3) ...
Setting up file (1:5.44-3) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...

root@b880ad41cfed:/go# which go
/usr/local/go/bin/go

root@b880ad41cfed:/go# file /usr/local/go/bin/go
/usr/local/go/bin/go: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=hku-irHRsR4ufOtwZaV2/zOE0JbkdEgsjVno-a2q6/jYtuRNgA40rIbLXyeXOg/iJLpfXxEqtzpNcMOcLLI, not stripped
@atc0005 atc0005 added this to the Next Release milestone Jul 25, 2024
@atc0005 atc0005 self-assigned this Jul 25, 2024
atc0005 added a commit that referenced this issue Jul 29, 2024
Add `file` to linting images:

- `go-ci-stable`
- `go-ci-oldstable`
- `go-ci-unstable`

This provides the requested tool for use with CodeQL GitHub
Actions jobs.

refs GH-1636
atc0005 added a commit that referenced this issue Jul 29, 2024
Add `file` to linting images:

- `go-ci-stable`
- `go-ci-oldstable`
- `go-ci-unstable`

This provides the requested tool for use with CodeQL GitHub
Actions jobs.

refs GH-1636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant