The backend logic already supports specifying custom network names. This
only adds the support for the frontend parsing.
Fixescontainers/podman#12282
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Per @edsantiago 's suggestion, make the pull commands consistent, always
accepting a value. Currently we have:
--pull
--pull=true
--pull=false
--pull-never
--pull-always
With this changes, we will only have pull with a variety of options,
ala:
--pull
--pull=true
--pull=false
--pull=never
--pull=always
For backward compatibility, the --pull-never and --pull-always
options will remain operational, however they are not documented
and are conisdered deprecated.
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
The current wording doesn't clearly state that volumes specified using
-v are only a factor when executing RUN instructions.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Currently, git-validation is used to do two things:
1. Check that all commits in a PR has DCO (Signed-off-by)
2. Check that all commits has limited subject length
Nowdays, there are better tools for that. For DCO,
https://github.com/apps/dco can be used, and for subject length check, I
mocked up a GHA CI job (originally in opencontainers/runc -- copied from
there with some minimal changes).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. Remove GO111MODULE=on and -mod=vendor. Those are not required
(default) since go 1.16 (or earlier), and go 1.16 is currently
the oldest supported release.
2. Remove go-build define:
- cd `pwd` does not make any sense;
- @echo > /dev/null masks any errors during tools building;
- $(shell basename ...) could be replaced by $(notdir ...);
- the above is not needed since we already have what we need
as a target ($@);
- finally, this is problematic for e.g. cpuguy83/go-md2man/v2
(as it builds the binary named v2).
So, just use $(GO_BUILD) -o $@ path/to/package
3. GO_BUILD does not need to be exported.
4. Mark $(BUILDDIR) target as phony -- a mere existence of the directory
should not cause make to skip building the binaries.
K.I.S.S!
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Allow users to specify non-volatile `upper` and `workdir` with overlay
mounts.
Usage
```console
buildah from alpine
buildah run -v /something/lower:/test:z,O,upperdir=/somewhere/upperdir,workdir=/somwhere/workdir alpine-working-container cat /test/hello
```
Signed-off-by: Aditya R <arajan@redhat.com>
Expose `MountWithOptions` for overlay which allows users to pass more
verbose configuration for overlay mounts.
For instance `upperdir, workerdir` and in future `volatile`.
Signed-off-by: Aditya R <arajan@redhat.com>
In situations where you don't want/need Cobra climbing behavior nor
Cobra at all using FlagSet is the easier sell.
Signed-off-by: Andreas Bergmeier <abergmeier@gmx.net>
As pointed out by unparam linter, the bool returned by resolveName is
never used (at least since commit e1444dd71e).
Also, since commit dcd2a92e56, resolveName is no longer public.
Remove the bool and the code which calculates it.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
... and its dependencies.
Also, modify .golangci.yml since new golangci-lint no longer have some
of the linters mentioned. Besides, it is unsafe to enable all linters,
because (1) not all linters are good/useful; (2) new golangci-lint
releases can bring more linters and thus more CI issues. Instead, use
the default set of linters, plus enable a few more:
* revive (which replaces golint)
* unconvert
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Commit 3a122aa3c added ignoring any file or directory named result,
which is wrong. What it meant to do is to ignore top-level result
directory. Fix accordingly.
Same for tests/tools -- this is meant to be the top-level directory
only.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Since commit 3eef1ed0bd (January 2019) using
capabilities.NewPid() is deprecated.
Replace with NewPid2().
Note that in chroot/run.go we used to load then clear all capabilities
bits. With NewPid2, this is no longer needed -- we do not load caps, so
there is no need to clear.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Newer golangci-lint does not understand the nolint: directive
because it is followed by some comment.
To fix, add a comment before the (human) comment.
While at it, remove the space after // since comments targeted for
non-humans should not have space (this is currently not enforced by
golangci-lint).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> tests/e2e/buildah_suite_test.go:166:27: S1025: the argument's underlying type is a slice of bytes, should use a simple conversion instead of fmt.Sprintf (gosimple)
> fields := strings.Fields(fmt.Sprintf("%s", s.Out.Contents()))
> ^
> tests/e2e/buildah_suite_test.go:173:12: S1025: the argument's underlying type is a slice of bytes, should use a simple conversion instead of fmt.Sprintf (gosimple)
> output := fmt.Sprintf("%s", s.Out.Contents())
> ^
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Fix the following warning:
> imagebuildah/executor.go:307:6: S1033: unnecessary guard around call to delete (gosimple)
> if _, stillUnused := exec.unusedArgs[list[0]]; stillUnused {
> ^
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>