Commit Graph

15 Commits

Author SHA1 Message Date
Chmouel Boudjnah 13f6261f84
increase subuid and subgid in image
increase the number of ids available to the podman users when running as
rootless.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2022-02-16 20:00:47 +01:00
Erik Sjölund 3c2a5947c2 fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". This is the only
  occurence found in the code.

* Replace https://raw.githubusercontent.com/containers/libpod/master
  with https://raw.githubusercontent.com/containers/podman/main

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 22:08:42 +01:00
Daniel J Walsh 2e50514ade
Move the chown to after the ADDs
I have noticed that the containers.conf file in the /home/podman
directory is owned by root and not Podman. This change fixes the
ownership.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-29 09:35:32 -05:00
Jindrich Novy 980c47aaa2
VOLUME must be declared after RUN chown command
Podman and Docker will not commit changes via RUN command
of a VOLUME directory, so we need to chown path first.

Not doing do will cause: https://bugzilla.redhat.com/show_bug.cgi?id=2009266

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-10 17:15:58 -05:00
Daniel J Walsh 2c9f18100f
Fix handling of shadow-utils
There seems to be a bug in rpm, where it fails silently if you specify
rpm --restore --quiet shadow-utils.

rpm --restore shadow-utils 2> /dev/null

Does the right thing.

[NO TESTS NEEDED] Might add tests from buildah, once we have them
working correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-24 05:45:10 -04:00
Daniel J Walsh b92bbfd768
Just restore protections of shadow-utils
Rather then reinstalling shadow-utils to fix permissions,
just restore the correct permissions.

[NO TESTS NEEDED] Since this does not affect Podman, just the prebuilt
images on quay.io/podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-19 06:40:01 -04:00
Blake Burkhart 2a974e8b94 Create user storage dir with correct permissions
Docker VOLUMEs will inherit permissions from an existing directory at the same
path. If the path does not exist, the directory will be owned by root which
makes this image unusable in rootless mode.

Signed-off-by: Blake Burkhart <blake.burkhart@us.af.mil>
2021-06-14 14:40:36 -05:00
Daniel J Walsh adbddac60f
Update podman image Dockerfile to support Podman in container
[NO TEST NEEDED] Can not test this in CI/CD system since it needs to be
merged in order for the Dockerfiles to even work.

Modified the /etc/subuid and /etc/subgid to be able to run in rootless
containers.  The Range can not be the same as on the host.

Add /home/podman/.config/containers/containers.conf to automatically
mount /proc on /proc while inside of the container. This prevents
additional permissions being required that are blocked when not in
--privileged mode.

Setup volumes for /var/lib/containers and
/home/podman/.local/share/containwers

This will prevent the errors where people are doing overlay on overlay.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-12 06:31:08 -04:00
Kirill Shirinkin 330e3d3728
Align images with Buildah
Signed-off-by: Kirill Shirinkin <kirill@hey.com>
2020-08-10 22:15:55 +02:00
TomSweeneyRedHat 36d36ec2a4 [CI:DOC]Use full repo name in podmanimage Dockerfiles
In the Buildah images, we had a problem where the testing image
was installed with an older version of Buildah than the stable
image.  This was apparently due to quay.io using Docker and Dockerhub
which has a version of Fedora that did not let testing
version of Buildah to be installed as it should have been.

This change fully specifies the name of the fedora image to
use.  This has not been a problem in Podman, but I'm carrying
this change here to avoid future problems.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-01 17:54:33 -04:00
TomSweeneyRedHat 9229312f2a Update podmanimage files to adjust perms on containers.conf for rootless
Adding the changes to the Podman image Docker/Containerfiles similar
to @rhatdan 's changes in https://github.com/containers/buildah/pull/2332

In short it changes the perms on containers.conf so it can be used by a
rootless user.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-04-28 17:52:14 -04:00
Daniel J Walsh 532c7343a9
Add support for containers.conf to podmanimages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-20 16:11:49 -04:00
TomSweeneyRedHat 77994c4957 Update podmanimage build process
(Stealing from: @rhatdan 's https://github.com/containers/buildah/pull/2038 )

1 We need to update all packages in the podman image to make sure they are
up2date.
2 reinstall shadow-utils. For some reason the fedora base image does not
include the file capabilities assigned to /usr/bin/newuidmap and
/usr/bin/newgidmap. Reinstalling shadow-utils, brings them back.
3 Add a default user build to the system. This will create the
/etc/subuid and /etc/subgid maps get created correctly.

Once we have this we should be able to build a container starting with a non
privileged user

podman run -ti --user build --device=/dev/fuse -v ./Dockerfile:/Dockerfile:z quay.io/podman/stable podman buildd /

Addresses: #4741

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-01-08 14:21:21 -05:00
TomSweeneyRedHat 8ad6f25db8 Turn off journald in podmanimages on quay.io
In the Dockerfiles that are used to build the podman images on
quay.io, we were changing the events_logger from journald to
file in libpod.conf, but we weren't enabling it as we didn't
remove the comment.  This corrects that and addresses: #3464

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-09-06 19:57:53 -04:00
TomSweeneyRedHat 54e1a3a103 Create Dockerfiles for podmanimage
The Dockerfiles necessary to create the stable, testing and upstream container images
on quay.io/user/podman.  Once this is commited, I will set up those images
such that they will be built with every git commit.

stable - Latest Fedora release image
testing - Latest release on bohdi Fedora testing
upstream - Latest version in upstream podman

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-01 14:22:38 -04:00