Commit Graph

40 Commits

Author SHA1 Message Date
Daniel J Walsh 0f802d0065 Add image_default_format
Currently when pulling/pushing images we default to the format
of the source image.  When Building images we default to OCI.

Customers have asked us to allow them to force a specific image
type when pushing to a registry.

We already have a flag to building images.

This PR adds image_default_format to define the format to be used
by all tools create/building/pulling and pusing images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-01 06:38:50 -05:00
Daniel J Walsh 451f5fb68b Change default log driver to journald
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-30 07:57:07 -05:00
Daniel J Walsh 952d2c9991 Add image_parallel_copies engine config
This will allow users to configure the amount of parallel copies that
the container engines are allowed to do. This allows users to configure
their systems to match their available network settings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-21 14:59:34 -05:00
Daniel J Walsh 58231b6407 http_proxy is supposed to default to true.
In the containers.conf we default to true, but in code and man page
it is defaulted to false. Since Podman wants it defaulted to true
we need to change default and man page to match.

Also fixed the testing for SELinux, which would never succeed on an SELinux box.

Helps fix: https://github.com/containers/podman/pull/8844

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-29 08:04:52 -05:00
Daniel J Walsh ec4a98a333 Switch references of /var/run -> /run
Systemd is now complaining or mentioning /var/run as a legacy directory.
It has been many years where /var/run is a symlink to /run on all
most distributions, make the change to the default.

Partial fix for https://github.com/containers/podman/issues/8369

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-18 06:27:41 -05:00
Daniel J Walsh 44e14b12b9 Find ociruntime instead of hard coding default
Users could have any one of the OCI runtimes installed,
code will search for default.  This way they do not need
to modify defaults if they have "crun" installed.

Search order will be crun, runc, kata

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-15 05:43:45 -05:00
Matthew Heon 33a960773b Add a volume plugins field to containers.conf
We decided that making users explicitly list plugins they wanted
to use was not a bad thing, and greatly simplifies our
implementation. As such, we need a place to do that, and
`containers.conf` is the logical location.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-04 13:48:24 -05:00
Daniel J Walsh d568d40354 Add ability to set system wide options for slirp4netns
Also fixup some formatting issues in man pages.

Fix generation of multiple man pages.

Partial fix for: https://github.com/containers/podman/issues/7888

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-25 13:42:53 -05:00
Daniel J Walsh 69ee79b12c Add support for enabling/disabling kernel keyring in engines
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-20 13:39:24 -05:00
Daniel J Walsh 83bda5699e Move buildah/pkg/secrets to common/pkg/subscriptions
Since secrets is shared by buildah, podman and cri-o, we need
to move it to containers/common.

Also move containers-mounts.conf.5.md to common from podman,
since this is common to all packages.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 10:31:58 -05:00
Daniel J Walsh 86a01f6857 Enabled the remote flag to be accessible by users
This flag would allow users to run the podman command
in podman-remote mode by default. If you are primarily using
podman to access a remote server, you might want to enable this
flag and not have to install podman-remote as well as podman command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-30 05:11:43 -04:00
Daniel J Walsh e2055b6dcc Fix description of no-common options for cgroups
The current description is wrong it says that no-common does
not use cgrous, when it should say there is no cgroup
created for the conmon process.

Fixes: https://github.com/containers/common/issues/321

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 13:32:04 -04:00
Daniel J Walsh d2c4ee7ce3 Allow users to specify the default format for image builds
Some users want to stick to "docker" format escecially since some older
container registries don't properly support OCI images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-21 16:13:48 -04:00
Daniel J Walsh 1ef1790040 Add TERM=xterm to default setting for env
We want to make sure that the TERM envionment variable is always
set.  TERM defaulted to ansi might be better, but we want to match
Docker defaults, so we will stick at xterm.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-18 11:37:15 -04:00
Daniel J Walsh 964d22fabd Add CONTAINERS_STORAGE_CONF Environment hanlding for testing
Currently it is difficult to modify the path to the storage.conf
file for setting up testing. It is hard coded to use /etc/containers/storage.conf.

Adding this envionment variable, will allow us to write tests on storage.conf
that do not override the system defaults.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-17 14:27:04 -04:00
Valentin Rothberg f217b00ded multi_image_archive: add option for `podman save`
Add an option to control the default behavior of `podman save` or other
container engines.  If set to "true", the engine will create a
multi-image (docker) archive.  By default, Podman will interpret
additional arguments as tags that'll be stored in the archive's
manifest.  Docker interprets additional arguments as images to allow for
creating multi-image archives.  This option allows users to chose how
they wish the default behavior to look like, so we don't break
compatibility with existing Podman workloads while being compatible
with Docker.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-08-17 14:44:43 +02:00
Ashley Cui 07d027889c Fix documentation
Fix a bunch of formatting nits for consistency's sake

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-08-03 14:25:54 -04:00
Daniel J Walsh f6135d97d2 Fix documenation
hooks_dir_path was in wrong location, should be under Enigne section

network_cmd_path was not documented.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-01 07:06:28 -04:00
Tom Sweeney b0dff4761d Merge pull request #223 from ashley-cui/umask
Add support for Umask
2020-07-15 19:43:44 -04:00
Jhon Honce 4f496fde52 Add support for multiple service destinations
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-07-15 14:02:00 -07:00
Ashley Cui 93a6847b2d Add support for Umask
Signed-off-by: Ashley Cui <acui@redhat.com>
2020-07-15 13:59:29 -04:00
Daniel J Walsh 560bd489ae Merge pull request #200 from ashley-cui/master
Add support for timezone
2020-06-30 17:07:39 -04:00
Ashley Cui bf1b8b15b6 Add support for timezone
Signed-off-by: Ashley Cui <acui@redhat.com>
2020-06-30 15:07:49 -04:00
Qi Wang 3d8b92bdb2 Specify container engine in comments of engine env
Specify that the container engines are Podman, Buildah

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-30 11:59:46 -04:00
Qi Wang 82a0ff9d5c Add container_engine_env for engine to use
Add container_env_var for setting envariables for engin to use.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-29 16:50:14 -04:00
Daniel J Walsh 9839b10d40 Fixup handling of remote_uri for documentation
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-23 12:48:26 -04:00
Daniel J Walsh c58a215838 Add support for cgroups configuration
We need to be able to disable cgroups when running container engines inside of containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-13 13:56:16 -04:00
Daniel J Walsh c719975a94 Add RuntimeSupportsKVM to config.Engine
We need to identify the list of containers that support KVM separation, these
containers can run with a different SELinux label, and we might be able to
make different decisions in the container engines about how to launch these
containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-07 10:11:59 -04:00
Valentin Rothberg ebd70f1b13 use `pause:3.2` image for infra containers
The `pause:3.1` has wrong configs for non-amd64 images as they all claim
to be for amd64.  The issue has now been fixed in the latest
`pause:3.2`.

[1] https://github.com/kubernetes/kubernetes/issues/87325

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-27 13:45:23 +01:00
Daniel J Walsh 4bb3c87228 Add kata containers support
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-27 06:54:25 -04:00
Daniel J Walsh 50135a792d Change references to libpod to engine
containers/common pkg/config is for more engines then just libpod.

We want to use the 'libpod' section to configure parts of buildah.  Renaming this
section to engine, makes it more obvious to users that these fields can effect other
container engines.

Certain fields are still libpod specific, so we do not change those fields.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-11 14:56:32 -04:00
Qi Wang 0c613a6abe Support and prefer libpod.conf if exists
During the transision period of replacing libpod.conf with containers.conf, pkg/config should also read the libpod.conf if it exist.
This patch reads the libpod.conf in NewConfig() and converts the configurations to ContainersConfig Struct.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-03-09 14:37:19 -04:00
Qi Wang bec93b6703 Add pull_policy to LibpodConfig
pull_policy is the same as podman run --pull option to determin whether to pull a new image when running a container.
Accepted "always", "missing", and "never". Default value is "missing".

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-03-03 11:13:38 -05:00
Daniel J Walsh 00b0aae703 Add StopTimeout for podman
Allow users to modify the default ammount of time to wait to send SIGKILL
after you tell a container to stop with a SIGINT.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-21 11:32:16 -05:00
Daniel J Walsh 3d6b785749 CgroupManager should belong to libpod not containers
CgroupManager is defined for managing containers, it is not defined
per container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-20 10:27:47 -05:00
Daniel J Walsh ad4b16c9d2 Remove additional_ adjective from containers.conf
Additional is implied, so should not be stated.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-19 09:48:11 -05:00
Daniel J Walsh 74d7f91c66 Update/Fix man page and fix several bugs in definition.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-03 13:57:01 -05:00
Daniel J Walsh dfb351a9da Add support for CONTAINERS_CONF environment variable
This is needed to help in CI/CD systems to use an alternative containers.conf file for testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-07 06:20:27 -05:00
Qi Wang 894913abdf add libpod.conf to containers.conf
Add configurations from libpod.conf to containers.conf.Use merge code from libpod to read and merge configurations from file.

Add unshare_linux for build linux: HomeDir should buildah not only for linux. so add unshare_linux for linux and unshare.go for other

convert bool to optinalbool:Use OptionalBool for on-disk configurations so we can distinguish field is undefined  vs. user set to false.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-12-06 15:55:47 -05:00
Qi Wang 9bb8e7e62b Add config package for containers.conf
This PR adds a package config for reading configurations from the containers.conf into the go struct.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-07 13:38:17 -04:00