summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile17
-rw-r--r--Makefile1
-rw-r--r--libpod/runtime.go22
-rw-r--r--test/e2e/info_test.go2
4 files changed, 38 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 59b5d5da3..6d44b963f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,9 +41,16 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends \
&& apt-get clean
-ADD . /go/src/github.com/containers/libpod
-
-RUN set -x && cd /go/src/github.com/containers/libpod && make install.libseccomp.sudo
+ENV LIBSECCOMP_COMMIT release-2.3
+RUN set -x \
+ && git clone https://github.com/seccomp/libseccomp "$GOPATH/src/github.com/seccomp/libseccomp" \
+ && cd "$GOPATH/src/github.com/seccomp/libseccomp" \
+ && git fetch origin --tags \
+ && git checkout -q "$LIBSECCOMP_COMMIT" \
+ && ./autogen.sh \
+ && ./configure --prefix=/usr \
+ && make all \
+ && make install
# Install runc
ENV RUNC_COMMIT 96ec2177ae841256168fcf76954f7177af9446eb
@@ -126,4 +133,8 @@ RUN mkdir -p /etc/containers && curl https://raw.githubusercontent.com/projectat
COPY test/policy.json /etc/containers/policy.json
COPY test/redhat_sigstore.yaml /etc/containers/registries.d/registry.access.redhat.com.yaml
+ADD . /go/src/github.com/containers/libpod
+
+RUN set -x && cd /go/src/github.com/containers/libpod
+
WORKDIR /go/src/github.com/containers/libpod
diff --git a/Makefile b/Makefile
index b68b8adbe..334ee980d 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,7 @@ BUILD_INFO ?= $(shell date +%s)
LIBPOD := ${PROJECT}/libpod
LDFLAGS_PODMAN ?= $(LDFLAGS) -X $(LIBPOD).gitCommit=$(GIT_COMMIT) -X $(LIBPOD).buildInfo=$(BUILD_INFO)
ISODATE ?= $(shell date --iso-8601)
+#Update to LIBSECCOMP_COMMIT should reflect in Dockerfile too.
LIBSECCOMP_COMMIT := release-2.3
# If GOPATH not specified, use one in the local directory
diff --git a/libpod/runtime.go b/libpod/runtime.go
index c7000d84a..c975f628b 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -385,6 +385,28 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
if _, err := toml.Decode(string(contents), runtime.config); err != nil {
return nil, errors.Wrapf(err, "error decoding configuration file %s", configPath)
}
+ } else if rootless.IsRootless() {
+ // If the configuration file was not found but we are running in rootless, a subset of the
+ // global config file is used.
+ for _, path := range []string{OverrideConfigPath, ConfigPath} {
+ contents, err := ioutil.ReadFile(OverrideConfigPath)
+ if err != nil {
+ // Ignore any error, the file might not be readable by us.
+ continue
+ }
+ tmpConfig := new(RuntimeConfig)
+ if _, err := toml.Decode(string(contents), tmpConfig); err != nil {
+ return nil, errors.Wrapf(err, "error decoding configuration file %s", path)
+ }
+
+ // Cherry pick the settings we want from the global configuration
+ runtime.config.ConmonPath = tmpConfig.ConmonPath
+ runtime.config.ConmonEnvVars = tmpConfig.ConmonEnvVars
+ runtime.config.OCIRuntimes = tmpConfig.OCIRuntimes
+ runtime.config.CNIPluginDir = tmpConfig.CNIPluginDir
+ runtime.config.NoPivotRoot = tmpConfig.NoPivotRoot
+ break
+ }
}
// Overwrite config with user-given configuration options
diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go
index 2022dff1b..637c04e0a 100644
--- a/test/e2e/info_test.go
+++ b/test/e2e/info_test.go
@@ -35,7 +35,7 @@ var _ = Describe("Podman Info", func() {
It("podman info json output", func() {
session := podmanTest.Podman([]string{"info", "--format=json"})
- session.Wait()
+ session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})