Commit Graph

17 Commits

Author SHA1 Message Date
Giuseppe Scrivano 4d9da85473 rootless: add the built-in slirp DNS server
add the slirp built-in DNS server when using slirp4netns.

Closes: https://github.com/containers/buildah/issues/1660

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1688
Approved by: TomSweeneyRedHat
2019-06-26 13:33:12 +00:00
Valentin Rothberg d3b5960957 run_linux.go: ignore unchecked errors
Reported by golangci-lint.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>

Closes: #1678
Approved by: rhatdan
2019-06-19 11:33:36 +00:00
TomSweeneyRedHat fcc05b7d60 buildah-run: fix-out-of-range panic (2)
Fix an out-of-range panic in buildah-run by moving the call to
setNonbloc() to the appropriate place (i.e., only when the copyPipes
parameter is set).

Replaces #1672.  Needed to make two smaller functions to make gofmt
happy.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1674
Approved by: rhatdan
2019-06-15 09:40:55 +00:00
Giuseppe Scrivano dc7b50c9da run: fix hang with run and --isolation=chroot
make the stdin pipe not blocking, so that it won't hang if the other
end is not reading from it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1668
Approved by: rhatdan
2019-06-13 13:26:46 +00:00
Giuseppe Scrivano 7a5afdb452 run: fix hang when using run
make the stdin pipe not blocking, so that it won't hang if the other
end is not reading from it.

Closes: https://github.com/containers/buildah/issues/1664

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1668
Approved by: rhatdan
2019-06-13 13:26:46 +00:00
Jordan Webb 94e095aaf8 Always close stdin pipe
Fixes: https://github.com/containers/buildah/issues/1650
Signed-off-by: Jordan Webb <jordemort@github.com>

Closes: #1653
Approved by: rhatdan
2019-06-12 08:35:10 +00:00
Lawrence Chan 49d8eb5b77 Only set default network sysctls if not rootless
Signed-off-by: Lawrence Chan <element103@gmail.com>

Closes: #1663
Approved by: rhatdan
2019-06-11 10:05:59 +00:00
Jordan Webb 5892f9db57 Support --dns=none like podman
Signed-off-by: Jordan Webb <jordemort@github.com>

Closes: #1649
Approved by: giuseppe
2019-06-11 07:20:50 +00:00
Nalin Dahyabhai 3bdc9edd67 imagebuildah: handle ID mappings for COPY --from
Fix handling of ID mapping for COPY: when copying from other containers,
use their mappings, and when copying from the host, use host mappings.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #1630
Approved by: TomSweeneyRedHat
2019-06-06 13:11:25 +00:00
Daniel J Walsh fa67ecb27a Cleanup Overlay Mounts content
There is a chance that buildah crashed and left overlay
content.  This patch will remove any left over content
before creating the overlay mounts.

Also the previous patch would not be able to handle multiple
overlay volume mounts.  This patch fixes this issue as well.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1625
Approved by: TomSweeneyRedHat
2019-06-05 13:47:29 +00:00
Giuseppe Scrivano fa7f030da8 linux: add check for sysctl before using it
check that the sysctl we'd like to use is supported by the kernel
before using it.

Closes: https://github.com/containers/buildah/issues/1618

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1619
Approved by: rhatdan
2019-05-28 17:40:32 +00:00
TomSweeneyRedHat e43b864952 Add default /root if empty on chroot iso
Checks to see if the $HOME envvar has been set
and if not, trys to set it as best as possible.

Fixes: #1592

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1594
Approved by: rhatdan
2019-05-22 06:53:33 +00:00
Daniel J Walsh bcc5e51a94 Add support for Overlay volumes into the container.
Overlay mounts allow buildah bud and buildah from to
specify a directory on the disk that will be mounted
as an overlay into the container, where the overlay can be written to
but when the RUN or buildah run exits, the modified files will dissapear.

The basic idea is to be able to mount cache from the disk for things like yum/dnf/apt
to be able to be used and modified in the contianer on a run command, but to be
kept fresh for each RUN.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1560
Approved by: giuseppe
2019-05-20 12:54:10 +00:00
Daniel J Walsh 7793c51a41 Fix rootless handling of /dev/shm size
Rootless mode was ignoreing the --shm-size option.
For some reason the test that would have caught this was disabled.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1595
Approved by: vrothberg
2019-05-18 09:31:58 +00:00
TomSweeneyRedHat 78fb869817 Don't create directory on container
In a prior PR, we were creating the directory from the
translated symlink onto the host container.  Instead
try to create that in the container and if it exists
already, just continue.

Fixes: #1562

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1565
Approved by: rhatdan
2019-05-01 21:42:12 +00:00
baude 34e7eba408 allow podman to build a client for windows
the podman remote-client for windows pulls in some buildah code for
things like commit and build.  we need to perform some slight
refactoring of buildah code to accomodate that build.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1551
Approved by: rhatdan
2019-04-26 19:16:11 +00:00
baude 5cd9be61ef allow buildah cross compile for a darwin target
the goal here is to allow ourselves to cross compile buildah for a darwin
target.  we are doing this to eventually protect from regressions that could
creep into buildah so we don't dig ourselves a deeper hole.

the simplified and non-variable approach to the make darwin was done with
intent to keep this simple until we can exploit things a little more.

once this PR merges, i will create a CI test that will test for regressions
on a make darwin.  we should also be doing a gofmt with a darwin target so the
!linux|darwin tagged files are also checked for completeness.  initially the
test can be optional for passing with the long-term idea that it be made
a firm requirement at the buildah maintainers behest.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #840
Approved by: rhatdan
2018-07-01 09:13:39 +00:00