summaryrefslogtreecommitdiff
path: root/cmd/podman/images
Commit message (Collapse)AuthorAge
* replace golint with revive linterPaul Holzinger2022-04-22
| | | | | | | | | | | | golint, scopelint and interfacer are deprecated. golint is replaced by revive. This linter is better because it will also check for our error style: `error strings should not be capitalized or end with punctuation or a newline` scopelint is replaced by exportloopref (already endabled) interfacer has no replacement but I do not think this linter is important. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* move golang.org/x/crypto/ssh/terminal to golang.org/x/termPaul Holzinger2022-04-22
| | | | | | | | golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just calling golang.org/x/term itslef so there are no functional changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Revert "images --size"Valentin Rothberg2022-04-14
| | | | | | | | | | | | This reverts commit e133a06d2f4a3e94bfbd60b647046f2f515c9c24. @nalind found a proper fix in c/storage [1] to address the performance issue. So we really don't need the flag anymore. Note the flag has never made it into any release. [1] https://github.com/containers/storage/commit/d76b3606fc9ca975bf436379f91105f0fac1555f Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* images --sizeValentin Rothberg2022-04-08
| | | | | | | | | | Add a --size option to podman images to allow for disabling computing the size of listed images. If listing images is critical to performance, user may chose to turn off size computation to speed things up. Context: #13755 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Remove error stutterDaniel J Walsh2022-03-25
| | | | | | | | | | | | | | | | | When podman gets an error it prints out "Error: " before printing the error string. If the error message starts with error, we end up with Error: error ... This PR Removes all of these stutters. logrus.Error() also prints out that this is an error, so no need for the error stutter. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #13588 from flouthoc/import-os-archOpenShift Merge Robot2022-03-23
|\ | | | | import: allow users to set `--os`, `--arch` and `--variant` of image imports
| * import: allow users to set os, arch and variant of importsAditya R2022-03-23
| | | | | | | | | | | | | | | | | | | | Allows users to set `--os` , `--arch` and `--variant` of the image created from the custom import. Following is useful when user is already aware of the values which are correct for their generated rootfs Signed-off-by: Aditya R <arajan@redhat.com>
* | fix a number of errcheck issuesValentin Rothberg2022-03-22
| | | | | | | | | | | | Numerous issues remain, especially in tests/e2e. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | linter: enable nilerrValentin Rothberg2022-03-22
| | | | | | | | | | | | | | A number of cases looked suspicious, so I marked them with `FIXME`s to leave some breadcrumbs. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | linter: enable wastedassignValentin Rothberg2022-03-22
|/ | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* podman rmi --ignoreValentin Rothberg2022-03-19
| | | | | | | | | | | Add an `--ignore` flag to `podman image rm` to instruct ignoring image if a specified image does not exist and to not throw an error. Other commands (e.g., `podman container rm`) already support this flag. Such an `--ignore` flag can come in handy in clean-up scripcts such as the teardown phases in the Podman tests. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* go fmt: use go 1.18 conditional-build syntaxValentin Rothberg2022-03-18
| | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Cleanup display of trust with transportsDaniel J Walsh2022-02-22
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #13047 from cdoern/scpSyntaxOpenShift Merge Robot2022-02-03
|\ | | | | podman image scp syntax correction
| * podman image scp syntax correctioncdoern2022-01-27
| | | | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] image scp was reading the localhost syntax too loosely causing some errors with domains or hosts containing the word localhost. Fixed that and added a few lines to make sure the pure localhost connections do not touch sshd resolves #13021 Signed-off-by: cdoern <cdoern@redhat.com>
* | Merge pull request #13029 from TomSweeneyRedHat/dev/tsweeney/mergepull2OpenShift Merge Robot2022-01-27
|\ \ | | | | | | Bump Buildah to v1.24.0
| * | Bump Buildah to v1.24.0tomsweeneyredhat2022-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps Buildah to v1.24.0 and adopts the new values for pull: true, false, never, and always. The pull-never and pull-always options for the build command are still usable, but they have been removed from the man page documentation with this change. Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
* | | switch podman image scp from depending on machinectl to just os/execcdoern2022-01-26
|/ / | | | | | | | | | | | | | | | | machinectl does not propogate error messages and adds extra lines in the output, exec.Cmd is able to clear the env besides PATH and TERM, and use the given UID and GID to execute the command properly. machinectl is still used to create a user session. Ubuntu support is limited by this. Signed-off-by: cdoern <cdoern@redhat.com>
* / remote build: set rootless oci isolation correctlyPaul Holzinger2022-01-24
|/ | | | | | | | | | | | | | When we run rootless buildah needs to have IsolationOCIRootless set otherwise it will run code which cannot be used as rootless user. Podman should use the buildah default if possible and change it to rootless mode if needed. [NO NEW TESTS NEEDED] Should be covered by existing tests once we have podman-remote rootless tests. Fixes #12989 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* bump go module to version 4Valentin Rothberg2022-01-18
| | | | | | | | | | | | | Automated for .go files via gomove [1]: `gomove github.com/containers/podman/v3 github.com/containers/podman/v4` Remaining files via vgrep [2]: `vgrep github.com/containers/podman/v3` [1] https://github.com/KSubedi/gomove [2] https://github.com/vrothberg/vgrep Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Unify the method of parsing filters in cmdJakub Guzik2022-01-16
| | | | | | | | This commit unifies the method of filters parsing in cmd. It removes also the function redundancy. [NO NEW TESTS NEEDED] Signed-off-by: Jakub Guzik <jguzik@redhat.com>
* Podman Build use absolute filepathcdoern2022-01-13
| | | | | | | | | podman build always finds the abs path but was never using it for the containerfile path. This was causing the remote client to be given a relative path that does not exist. Switch to evaluating and using absolute paths only. resolves #12841 Signed-off-by: cdoern <cdoern@redhat.com>
* Merge pull request #12642 from Luap99/libnetworkOpenShift Merge Robot2022-01-13
|\ | | | | use libnetwork from c/common
| * podman build enable --all-platforms and --unsetenvPaul Holzinger2022-01-13
| | | | | | | | | | | | | | Make sure we add support for allplatforms and unsetenv to both local and remote podman. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | podman image scp: implement --quietEd Santiago2022-01-12
|/ | | | | | | | | | | | | | | | Relay --quiet to save & load commands, in both Rootless and Rootful transfer functions. Also, a little cleanup: - remove unuseful SOURCE/DEST printfs - refactor duplication in execMachine() - fix Debug("Executing") statements to include the actual command they're executing [NO NEW TESTS NEEDED] : Tests are being slowly implemented in #12797 Signed-off-by: Charlie Doern <cdoern@redhat.com> Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12429 from cdoern/scpOpenShift Merge Robot2022-01-05
|\ | | | | podman image scp never enter podman user NS
| * podman image scp never enter podman user NScdoern2021-12-23
| | | | | | | | | | | | | | | | | | | | | | Podman image scp should never enter the Podman UserNS unless it needs to. This allows for a sudo exec.Command to transfer images to and from rootful storage. If this command is run using sudo, the simple sudo podman save/load does not work, machinectl/su is necessary here. This modification allows for both rootful and rootless transfers, and an overall change of scp to be more of a wrapper function for different load and save calls as well as the ssh component Signed-off-by: cdoern <cdoern@redhat.com>
* | build: relay exitcode from imagebuildah to registryAditya Rajan2021-12-17
|/ | | | | | | | Podman does not relay exit code from buildah instead returns a generic error code `125`. Following PR allows `podman` to relay exit code from `imagebuildah` to `registry` as it is. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* Refactor podman image command outputJhon Honce2021-12-02
| | | | | | | | | | | Leverage new report.Formatter allowing better compatibility from podman command output. Follow on PR's will cover containers, etc. See #10974 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podman, push: expose --compression-formatGiuseppe Scrivano2021-12-01
| | | | | | support overriding the compression format at push time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* podman-remote does not support signature-policyDaniel J Walsh2021-11-19
| | | | | | Fixes: https://github.com/containers/podman/issues/12357 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12270 from rhatdan/authOpenShift Merge Robot2021-11-13
|\ | | | | --authfile command line argument for image sign command.
| * --authfile command line argument for image sign command.José Guilherme Vanz2021-11-11
| | | | | | | | | | | | | | | | | | | | | | Adds the --authfile command line argument to allow users to use alternative authfile paths when signing images. Replaces: https://github.com/containers/podman/pull/10975 Fixes: https://github.com/containers/podman/issues/10866 Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12224 from cdoern/scpOpenShift Merge Robot2021-11-12
|\ \ | |/ |/| Podman Image SCP transfer patch
| * Podman Image SCP transfer patchcdoern2021-11-11
| | | | | | | | | | | | | | | | | | | | Fixed syntax so that podman image scp transfer works with no user specified. This command can only be executed as root so to obtain the default user, I searched for the SUDO_USER environmental variable. If that is not found, we error out and inform the user to set this variable and make sure they are running as root Signed-off-by: cdoern <cdoern@redhat.com> Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | podman load: support downloading filesValentin Rothberg2021-11-10
| | | | | | | | | | | | | | | | | | | | | | | | Support downloading files, for instance via `podman load -i server.com/image.tar`. The specified URL is downloaded in the frontend and stored as a temp file that gets passed down to the backend. Also vendor in c/common@main to use the new `pkg/download`. Fixes: #11970 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | test connection addJhon Honce2021-11-08
| | | | | | | | | | | | | | | | | | | | * Fix connection JSON encoding * Add custom ginkgo matchers for connection testing * Cleanup code Fixes #11984 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #11958 from cdoern/scpOpenShift Merge Robot2021-11-08
|\| | | | | Podman Image SCP rootful to rootless transfer
| * Podman Image SCP rootful to rootless transfercdoern2021-11-05
| | | | | | | | | | | | | | | | | | | | | | Added functionality for users to transfer images from root storage to rootless storage without using sshd. This is done through rootful podman by running `sudo podman image scp root@localhost::image user@localhost:: the user is needed in order to find and use their uid/gid to exec a new process. added necessary tests, and functions for this implementation. Created new image function Transfer so that the underlying code is majorly removed from CLI Signed-off-by: cdoern <cdoern@redhat.com>
* | tweak a couple of flag descriptions in help outputNalin Dahyabhai2021-11-04
|/ | | | | | Descriptions of flags don't need to start with whitespace of their own. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* Fix some typos in documentation and comments (found by codespell)Stefan Weil2021-10-25
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* podman search: display only name and description by defaultValentin Rothberg2021-10-13
| | | | | | | | | | | | | | | | | | | Change the default format of `podman search` to only display the name and the description of each image. The index is redundant to the name and consumes a lot of space, and other descriptors (i.e., stars, official, automated) are specific to Docker Hub and also consume a lot space. Users can still use `--format` for displaying the descriptors they want to. Add a `--compatible` flag to offer an easy way to get them back. Also update the man page to account for the behavior and get some fresh data in the examples. Motivated by a recent conversation in libimage: https://github.com/containers/common/pull/802#issuecomment-937108734 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #11924 from jwhonce/issues/11894OpenShift Merge Robot2021-10-12
|\ | | | | Refactor podman search to be more code friendly
| * Refactor podman search to be more code friendlyJhon Honce2021-10-12
| | | | | | | | | | | | | | | | | | | | | | * JSON and API description fields are no longer truncated. Formatting moved to client, better support of MVP. * --no-trunc now defaults to true * Updated tests for changes Closes #11894 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | builder: Add support for builder pruneAditya Rajan2021-10-12
|/ | | | | | | | | | | | | | Docker has support for docker builder prune and docker builder build This patch will add a hidden command to support scripts using this syntax. We don't want to encourage this deviation. Add podman build prune to implement docker builder prune functionality. Co-authored-by: Daniel J Walsh <dwalsh@redhat.com> Signed-off-by: Aditya Rajan <arajan@redhat.com>
* image prune: support removing external containersValentin Rothberg2021-09-28
| | | | | | | | Support removing external containers (e.g., build containers) during image prune. Fixes: #11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Fix english on prune promptDaniel J Walsh2021-09-24
| | | | | | | | Google docs found this while writing Podman in Action book. [NO TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* standardize logrus messages to upper caseDaniel J Walsh2021-09-22
| | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* podman save: add `--uncompressed`Valentin Rothberg2021-09-22
| | | | | | | | | | Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add podman image/container inspect man pagesDaniel J Walsh2021-09-20
| | | | | | | | [NO TESTS NEEDED] since this is really a docs change. Concludes: https://github.com/containers/podman/pull/11620 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>