summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/multi-arch-build.yaml115
-rwxr-xr-xcontrib/cirrus/pr-should-include-tests1
-rw-r--r--contrib/podmanimage/README.md23
-rw-r--r--contrib/podmanimage/stable/manual/Containerfile36
-rw-r--r--docs/README.md1
-rwxr-xr-xdocs/remote-docs.sh5
-rw-r--r--docs/use-pagetitle.lua14
-rw-r--r--go.mod2
-rw-r--r--go.sum6
-rw-r--r--libpod/network/config.go11
-rw-r--r--libpod/network/create.go4
-rw-r--r--libpod/network/netconflist.go9
-rw-r--r--pkg/domain/entities/volumes.go42
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go3
-rw-r--r--vendor/github.com/containers/common/pkg/config/containers.conf19
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go16
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
18 files changed, 168 insertions, 143 deletions
diff --git a/.github/workflows/multi-arch-build.yaml b/.github/workflows/multi-arch-build.yaml
index e4ab88544..2a86bab7e 100644
--- a/.github/workflows/multi-arch-build.yaml
+++ b/.github/workflows/multi-arch-build.yaml
@@ -1,3 +1,8 @@
+---
+
+# Please see contrib/podmanimage/README.md for details on the intentions
+# of this workflow.
+
name: build multi-arch images
on:
@@ -54,8 +59,10 @@ jobs:
push: true
tags: localhost:5000/podman/${{ matrix.source }}
- # Simple verification that container works + grab version number
+ # Simple verification that stable images work, and
+ # also grab version number use in forming the FQIN.
- name: amd64 container sniff test
+ if: matrix.source == 'stable'
id: sniff_test
run: |
VERSION_OUTPUT="$(docker run localhost:5000/podman/${{ matrix.source }} \
@@ -65,69 +72,69 @@ jobs:
test -n "$VERSION"
echo "::set-output name=version::${VERSION}"
- # Generate image FQINs, labels, check whether to push
- - name: Generate image information
- id: image_info
+ - name: Generate podman reg. image FQIN(s)
+ id: podman_reg
run: |
- VERSION='v${{ steps.sniff_test.outputs.version }}'
- # workaround vim syntax-hilighting bug: '
if [[ "${{ matrix.source }}" == 'stable' ]]; then
- # quay.io/podman/stable:vX.X.X
+ # The `podman version` in image just built
+ VERSION='v${{ steps.sniff_test.outputs.version }}'
+ # workaround vim syntax-highlight bug: '
+ # Image tags previously pushed to quay
ALLTAGS=$(skopeo list-tags \
docker://$PODMAN_QUAY_REGISTRY/stable | \
jq -r '.Tags[]')
- PUSH="false"
- if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
- PUSH="true"
- fi
- FQIN="$PODMAN_QUAY_REGISTRY/stable:$VERSION"
- # Only push if version tag does not exist
- if [[ "$PUSH" == "true" ]]; then
- echo "Will push $FQIN"
- echo "::set-output name=podman_push::true"
- echo "::set-output name=podman_fqin::${FQIN}"
- else
- echo "Not pushing, $FQIN already exists."
+ # New image? Push quay.io/podman/stable:vX.X.X and :latest
+ if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
+ # Assume version-tag is also the most up to date (i.e. "latest")
+ FQIN="$PODMAN_QUAY_REGISTRY/stable:$VERSION,$PODMAN_QUAY_REGISTRY/stable:latest"
+ else # Not a new version-tagged image
+ # Assume other contents changed, so this is the "new" latest.
+ FQIN="$PODMAN_QUAY_REGISTRY/stable:latest"
fi
-
- # quay.io/containers/podman:vX.X.X
- unset ALLTAGS
+ elif [[ "${{ matrix.source }}" == 'testing' ]]; then
+ # Assume some contents changed, always push latest testing.
+ FQIN="$PODMAN_QUAY_REGISTRY/testing:latest"
+ elif [[ "${{ matrix.source }}" == 'upstream' ]]; then
+ # Assume some contents changed, always push latest upstream.
+ FQIN="$PODMAN_QUAY_REGISTRY/upstream:latest"
+ else
+ echo "::error::Unknown matrix item '${{ matrix.source }}'"
+ exit 1
+ fi
+ echo "::warning::Pushing $FQIN"
+ echo "::set-output name=fqin::${FQIN}"
+ echo '::set-output name=push::true'
+
+ # This is substantially the same as the above step, except the
+ # $CONTAINERS_QUAY_REGISTRY is used and the "testing"
+ # flavor is never pushed.
+ - name: Generate containers reg. image FQIN(s)
+ if: matrix.source != 'testing'
+ id: containers_reg
+ run: |
+ if [[ "${{ matrix.source }}" == 'stable' ]]; then
+ VERSION='v${{ steps.sniff_test.outputs.version }}'
+ # workaround vim syntax-highlight bug: '
ALLTAGS=$(skopeo list-tags \
docker://$CONTAINERS_QUAY_REGISTRY/podman | \
jq -r '.Tags[]')
- PUSH="false"
- if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
- PUSH="true"
- fi
- FQIN="$CONTAINERS_QUAY_REGISTRY/podman:$VERSION"
- # Only push if version tag does not exist
- if [[ "$PUSH" == "true" ]]; then
- echo "Will push $FQIN"
- echo "::set-output name=containers_push::true"
- echo "::set-output name=containers_fqin::$FQIN"
- else
- echo "Not pushing, $FQIN already exists."
+ # New image? Push quay.io/containers/podman:vX.X.X and :latest
+ if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
+ FQIN="$CONTAINERS_QUAY_REGISTRY/podman:$VERSION,$CONTAINERS_QUAY_REGISTRY/podman:latest"
+ else # Not a new version-tagged image, but contents may be updated
+ FQIN="$CONTAINERS_QUAY_REGISTRY/podman:latest"
fi
- elif [[ "${{ matrix.source }}" == 'testing' ]]; then
- P_FQIN="$PODMAN_QUAY_REGISTRY/testing:master"
- echo "Will push $P_FQIN"
- echo "::set-output name=podman_fqin::${P_FQIN}"
- echo '::set-output name=podman_push::true'
elif [[ "${{ matrix.source }}" == 'upstream' ]]; then
- P_FQIN="$PODMAN_QUAY_REGISTRY/upstream:master"
- C_FQIN="$CONTAINERS_QUAY_REGISTRY/podman:master"
- echo "Will push $P_FQIN and $C_FQIN"
- echo "::set-output name=podman_fqin::${P_FQIN}"
- echo "::set-output name=containers_fqin::${C_FQIN}"
- # Always push 'master' tag
- echo '::set-output name=podman_push::true'
- echo '::set-output name=containers_push::true'
+ FQIN="$CONTAINERS_QUAY_REGISTRY/podman:latest"
else
- echo "::error ::Unknown matrix value ${{ matrix.source }}"
+ echo "::error::Unknown matrix item '${{ matrix.source }}'"
exit 1
fi
+ echo "::warning::Pushing $FQIN"
+ echo "::set-output name=fqin::${FQIN}"
+ echo '::set-output name=push::true'
- name: Define LABELS multi-line env. var. value
run: |
@@ -153,7 +160,7 @@ jobs:
# Push to 'podman' Quay repo for stable, testing. and upstream
- name: Login to 'podman' Quay registry
uses: docker/login-action@v1
- if: ${{ steps.image_info.outputs.podman_push == 'true' }}
+ if: steps.podman_reg.outputs.push == 'true'
with:
registry: ${{ env.PODMAN_QUAY_REGISTRY }}
# N/B: Secrets are not passed to workflows that are triggered
@@ -163,7 +170,7 @@ jobs:
- name: Push images to 'podman' Quay
uses: docker/build-push-action@v2
- if: ${{ steps.image_info.outputs.podman_push == 'true' }}
+ if: steps.podman_reg.outputs.push == 'true'
with:
cache-from: type=registry,ref=localhost:5000/podman/${{ matrix.source }}
cache-to: type=inline
@@ -171,13 +178,13 @@ jobs:
file: ./contrib/podmanimage/${{ matrix.source }}/Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
- tags: ${{ steps.image_info.outputs.podman_fqin }}
+ tags: ${{ steps.podman_push.outputs.fqin }}
labels: |
${{ env.LABELS }}
# Push to 'containers' Quay repo only stable podman
- name: Login to 'containers' Quay registry
- if: ${{ steps.image_info.outputs.containers_push == 'true' }}
+ if: steps.containers_reg.outputs.push == 'true'
uses: docker/login-action@v1
with:
registry: ${{ env.CONTAINERS_QUAY_REGISTRY}}
@@ -185,7 +192,7 @@ jobs:
password: ${{ secrets.CONTAINERS_QUAY_PASSWORD }}
- name: Push images to 'containers' Quay
- if: ${{ steps.image_info.outputs.containers_push == 'true' }}
+ if: steps.containers_reg.outputs.push == 'true'
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=localhost:5000/podman/${{ matrix.source }}
@@ -194,6 +201,6 @@ jobs:
file: ./contrib/podmanimage/${{ matrix.source }}/Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
- tags: ${{ steps.image_info.outputs.containers_fqin }}
+ tags: ${{ steps.containers_reg.outputs.fqin }}
labels: |
${{ env.LABELS }}
diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests
index 9ccac17a3..392136fdb 100755
--- a/contrib/cirrus/pr-should-include-tests
+++ b/contrib/cirrus/pr-should-include-tests
@@ -39,6 +39,7 @@ filtered_changes=$(git diff --name-status $base $head |
fgrep -vx go.mod |
fgrep -vx go.sum |
egrep -v '^[^/]+\.md$' |
+ egrep -v '^.github' |
egrep -v '^contrib/' |
egrep -v '^docs/' |
egrep -v '^hack/' |
diff --git a/contrib/podmanimage/README.md b/contrib/podmanimage/README.md
index 7641f6c7e..32590d185 100644
--- a/contrib/podmanimage/README.md
+++ b/contrib/podmanimage/README.md
@@ -16,11 +16,24 @@ default to `/`.
The container images are:
- * quay.io/containers/podman - This image is built using the latest stable version of Podman in a Fedora based container. Built with [podmanimage/stable/Dockerfile](stable/Dockerfile).
- * quay.io/podman/stable - This image is built using the latest stable version of Podman in a Fedora based container. Built with [podmanimage/stable/Dockerfile](stable/Dockerfile).
- * quay.io/podman/upstream - This image is built using the latest code found in this GitHub repository. When someone creates a commit and pushes it, the image is created. Due to that the image changes frequently and is not guaranteed to be stable. Built with [podmanimage/upstream/Dockerfile](upstream/Dockerfile).
- * quay.io/podman/testing - This image is built using the latest version of Podman that is or was in updates testing for Fedora. At times this may be the same as the stable image. This container image will primarily be used by the development teams for verification testing when a new package is created. Built with [podmanimage/testing/Dockerfile](testing/Dockerfile).
- * quay.io/podman/stable:version - This image is built manually using a Fedora based container. An RPM is first pulled from the [Fedora Updates System](https://bodhi.fedoraproject.org/) and the image is built from there. For more details, see the Containerfile used to build it, [podmanimage/stable/manual/Containerfile](stable/manual/Containerfile).
+ * `quay.io/containers/podman:<version>` and `quay.io/podman/stable:<version>` -
+ These images are built when a new podman version becomes available in
+ Fedora. These images are intended to be unchanging and stable, they will
+ never be updated by automation once they've been pushed. For build
+ details, see the configuration used to build it,
+ [podmanimage/stable/Dockerfile](stable/Dockerfile).
+ * `quay.io/containers/podman:latest` and `quay.io/podman/stable:latest` -
+ Built daily using the same Containerfile as above. The podman version
+ will remain the "latest" available in Fedora, however the other image
+ contents may vary compared to the version-tagged images.
+ * `quay.io/podman/testing:latest` - This image is built daily, using the
+ latest version of Podman that was in the Fedora `updates-testing` repository.
+ The image is Built with [podmanimage/testing/Dockerfile](testing/Dockerfile).
+ * `quay.io/podman/upstream:latest` - This image is built daily using the latest
+ code found in this GitHub repository. Due to the image changing frequently,
+ it's not guaranteed to be stable or even executable. The image is built with
+ [podmanimage/upstream/Dockerfile](upstream/Dockerfile).
+
## Sample Usage
diff --git a/contrib/podmanimage/stable/manual/Containerfile b/contrib/podmanimage/stable/manual/Containerfile
deleted file mode 100644
index fb4d1adc0..000000000
--- a/contrib/podmanimage/stable/manual/Containerfile
+++ /dev/null
@@ -1,36 +0,0 @@
-# stable/manual/Containerfile
-#
-# Build a Podman container image from the latest
-# stable version of Podman on the Fedora Updates System.
-# https://bodhi.fedoraproject.org/updates/?search=podman
-# This image can be used to create a secured container
-# that runs safely with privileges within the container.
-# This Containerfile builds version 1.7.0, the version and
-# the RPM name would need to be adjusted before a run as
-# appropriate.
-#
-# To use, first copy an rpm file from bodhi to `/root/tmp`
-# and then run:
-# 'podman build -f ./Containerfile -t quay.io/podman/stable:v1.7.0 .'
-#
-# Once complete run:
-# `podman push quay.io/stable:v1.7.0 docker://quay.io/podman/stable:v1.7.0`
-#
-# Start Build Process using the latest Fedora
-FROM registry.fedoraproject.org/fedora:latest
-
-# Don't include container-selinux and remove
-# directories used by dnf that are just taking
-# up space.
-#
-COPY /tmp/podman-1.7.0-3.fc30.x86_64.rpm /tmp
-RUN yum -y install /tmp/podman-1.7.0-3.fc30.x86_64.rpm fuse-overlayfs --exclude container-selinux; rm -rf /var/cache /var/log/dnf* /var/log/yum.* /tmp/podman*.rpm
-
-ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/
-
-# chmod containers.conf and adjust storage.conf to enable Fuse storage.
-RUN chmod 644 /etc/containers/containers.conf; sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' /etc/containers/storage.conf
-RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers /var/lib/shared/vfs-images /var/lib/shared/vfs-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock; touch /var/lib/shared/vfs-images/images.lock; touch /var/lib/shared/vfs-layers/layers.lock
-
-
-ENV _CONTAINERS_USERNS_CONFIGURED=""
diff --git a/docs/README.md b/docs/README.md
index 83f5c79a3..a00b8f39c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -26,6 +26,7 @@ link on that page.
| ------------------------------------ | --------------------------- |
| docs/remote-docs.sh | Read the docs/source/markdown files and format for each platform |
| docs/links-to-html.lua | pandoc filter to do aliases for html files |
+| docs/use-pagetitle.lua | pandoc filter to set html document title |
## API Reference
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh
index 939c7264c..b1682e9cd 100755
--- a/docs/remote-docs.sh
+++ b/docs/remote-docs.sh
@@ -80,7 +80,10 @@ function html_fn() {
local link=$(sed -e 's?.so man1/\(.*\)?\1?' <$dir/links/${file%.md})
markdown=$dir/$link.md
fi
- pandoc --ascii --lua-filter=docs/links-to-html.lua -o $TARGET/${file%%.*}.html $markdown
+ pandoc --ascii --standalone \
+ --lua-filter=docs/links-to-html.lua \
+ --lua-filter=docs/use-pagetitle.lua \
+ -o $TARGET/${file%%.*}.html $markdown
}
# Run 'podman help' (possibly against a subcommand, e.g. 'podman help image')
diff --git a/docs/use-pagetitle.lua b/docs/use-pagetitle.lua
new file mode 100644
index 000000000..ebc92641d
--- /dev/null
+++ b/docs/use-pagetitle.lua
@@ -0,0 +1,14 @@
+local List = require("pandoc.List")
+
+function Meta(m)
+ -- Use pagetitle instead of title (prevents pandoc inserting a <H1> title)
+ m.pagetitle = m.title
+ m.title = nil
+
+ if m.pagetitle ~= nil and m.pagetitle.t == "MetaInlines" then
+ -- Add suffix to match the Sphinx HTML documentation
+ List.extend(m.pagetitle, {pandoc.Str" \u{2014} Podman documentation"})
+ end
+
+ return m
+end
diff --git a/go.mod b/go.mod
index fb5556280..6bdb3d390 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@ require (
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.1
github.com/containers/buildah v1.20.1-0.20210402144408-36a37402d0c8
- github.com/containers/common v0.37.0
+ github.com/containers/common v0.37.1
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.11.1
github.com/containers/ocicrypt v1.1.1
diff --git a/go.sum b/go.sum
index 7bef90bdf..36b0dce22 100644
--- a/go.sum
+++ b/go.sum
@@ -195,8 +195,8 @@ github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRD
github.com/containers/buildah v1.20.1-0.20210402144408-36a37402d0c8 h1:RlqbDlfE3+qrq4bNTZG7NVPqCDzfZrgE/yicu0VAykQ=
github.com/containers/buildah v1.20.1-0.20210402144408-36a37402d0c8/go.mod h1:iowyscoAC5jwNDhs3c5CLGdBZ9FJk5UOoN2I5TdmXFs=
github.com/containers/common v0.35.4/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
-github.com/containers/common v0.37.0 h1:RRyR8FITTJXfrF7J9KXKSplywY4zsXoA2kuQXMaUaNo=
-github.com/containers/common v0.37.0/go.mod h1:dgbJcccCPTmncqxhma56+XW+6d5VzqGF6jtkMHyu3v0=
+github.com/containers/common v0.37.1 h1:V71FK6k2KsNgcNtspGlrdCaKrSml/SO6bKmJdWjSnaY=
+github.com/containers/common v0.37.1/go.mod h1:ONPdpc69oQG9e75v/eBzzAReuv0we5NcGdEzK4meDv4=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/image/v5 v5.10.5/go.mod h1:SgIbWEedCNBbn2FI5cH0/jed1Ecy2s8XK5zTxvJTzII=
@@ -216,7 +216,6 @@ github.com/containers/storage v1.24.8/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5so
github.com/containers/storage v1.28.0/go.mod h1:ixAwO7Bj31cigqPEG7aCz+PYmxkDxbIFdUFioYdxbzI=
github.com/containers/storage v1.28.1/go.mod h1:5bwiMh2LkrN3AWIfDFMH7A/xbVNLcve+oeXYvHvW8cc=
github.com/containers/storage v1.29.0/go.mod h1:u84RU4CCufGeJBNTRNwMB+FoE+AiFeFw4SsMoqAOeCM=
-github.com/containers/storage v1.30.0/go.mod h1:M/xn0pg6ReYFrLtWl5YELI/a4Xjq+Z3e5GJxQrJCcDI=
github.com/containers/storage v1.30.1 h1:+87sZDoUp0uNsP45dWypHTWTEoy0eNDgFYjTU1XIRVQ=
github.com/containers/storage v1.30.1/go.mod h1:NDJkiwxnSHD1Is+4DGcyR3SIEYSDOa0xnAW+uGQFx9E=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
@@ -505,7 +504,6 @@ github.com/klauspost/compress v1.11.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.12.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.12.2 h1:2KCfW3I9M7nSc5wOqXAlW2v2U6v+w6cbjvbfp+OykW8=
github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
diff --git a/libpod/network/config.go b/libpod/network/config.go
index 294e23509..ac4478602 100644
--- a/libpod/network/config.go
+++ b/libpod/network/config.go
@@ -149,7 +149,18 @@ type DNSNameConfig struct {
Capabilities map[string]bool `json:"capabilities"`
}
+// PodmanMachineConfig enables port handling on the host OS
+type PodmanMachineConfig struct {
+ PluginType string `json:"type"`
+ Capabilities map[string]bool `json:"capabilities"`
+}
+
// Bytes outputs the configuration as []byte
func (d DNSNameConfig) Bytes() ([]byte, error) {
return json.MarshalIndent(d, "", "\t")
}
+
+// Bytes outputs the configuration as []byte
+func (p PodmanMachineConfig) Bytes() ([]byte, error) {
+ return json.MarshalIndent(p, "", "\t")
+}
diff --git a/libpod/network/create.go b/libpod/network/create.go
index 4fe9b445f..aca8150b5 100644
--- a/libpod/network/create.go
+++ b/libpod/network/create.go
@@ -231,6 +231,10 @@ func createBridge(name string, options entities.NetworkCreateOptions, runtimeCon
plugins = append(plugins, NewDNSNamePlugin(DefaultPodmanDomainName))
}
}
+ // Add the podman-machine CNI plugin if we are in a machine
+ if runtimeConfig.MachineEnabled() { // check if we are in a machine vm
+ plugins = append(plugins, NewPodmanMachinePlugin())
+ }
ncList["plugins"] = plugins
b, err := json.MarshalIndent(ncList, "", " ")
if err != nil {
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index 08816f2bd..d2031df6d 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -293,3 +293,12 @@ func getCreatedTimestamp(config *config.Config, netconf *libcni.NetworkConfigLis
created := time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)) // nolint: unconvert
return &created, nil
}
+
+func NewPodmanMachinePlugin() PodmanMachineConfig {
+ caps := make(map[string]bool, 1)
+ caps["portMappings"] = true
+ return PodmanMachineConfig{
+ PluginType: "podman-machine",
+ Capabilities: caps,
+ }
+}
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index 55a6a1b14..62f5401cc 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -4,6 +4,8 @@ import (
"net/url"
"github.com/containers/podman/v3/libpod/define"
+ docker_api_types "github.com/docker/docker/api/types"
+ docker_api_types_volume "github.com/docker/docker/api/types/volume"
)
// Volume volume
@@ -91,42 +93,6 @@ type VolumeConfigResponse struct {
define.InspectVolumeData
}
-// VolumeInfo Volume list response
-// swagger:model VolumeInfo
-type VolumeInfo struct {
-
- // Date/Time the volume was created.
- CreatedAt string `json:"CreatedAt,omitempty"`
-
- // Name of the volume driver used by the volume. Only supports local driver
- // Required: true
- Driver string `json:"Driver"`
-
- // User-defined key/value metadata.
- // Always included
- Labels map[string]string `json:"Labels"`
-
- // Mount path of the volume on the host.
- // Required: true
- Mountpoint string `json:"Mountpoint"`
-
- // Name of the volume.
- // Required: true
- Name string `json:"Name"`
-
- // The driver specific options used when creating the volume.
- // Required: true
- Options map[string]string `json:"Options"`
-
- // The level at which the volume exists.
- // Libpod does not implement volume scoping, and this is provided solely for
- // Docker compatibility. The value is only "local".
- // Required: true
- Scope string `json:"Scope"`
-
- // TODO: We don't include the volume `Status` for now
-}
-
type VolumeRmOptions struct {
All bool
Force bool
@@ -158,7 +124,7 @@ type VolumeListReport struct {
// VolumeListBody Volume list response
// swagger:model VolumeListBody
type VolumeListBody struct {
- Volumes []*VolumeInfo
+ Volumes []docker_api_types_volume.VolumeListOKBody
}
// Volume list response
@@ -191,7 +157,7 @@ type SwagDockerVolumeInfoResponse struct {
type SwagDockerVolumePruneResponse struct {
// in:body
Body struct {
- // docker_api_types.VolumesPruneReport
+ docker_api_types.VolumesPruneReport
}
}
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index 1629bea29..1531422cd 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -263,6 +263,9 @@ type EngineConfig struct {
// LockType is the type of locking to use.
LockType string `toml:"lock_type,omitempty"`
+ // MachineEnabled indicates if Podman is running in a podman-machine VM
+ MachineEnabled bool `toml:"machine_enabled,omitempty"`
+
// MultiImageArchive - if true, the container engine allows for storing
// archives (e.g., of the docker-archive transport) with multiple
// images. By default, Podman creates single-image archives.
diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf
index 0114f2975..00edd5438 100644
--- a/vendor/github.com/containers/common/pkg/config/containers.conf
+++ b/vendor/github.com/containers/common/pkg/config/containers.conf
@@ -336,6 +336,11 @@ default_sysctls = [
#
# lock_type** = "shm"
+# Indicates if Podman is running inside a VM via Podman Machine.
+# Podman uses this value to do extra setup around networking from the
+# container inside the VM to to host.
+# machine_enabled=false
+
# MultiImageArchive - if true, the container engine allows for storing archives
# (e.g., of the docker-archive transport) with multiple images. By default,
# Podman creates single-image archives.
@@ -403,7 +408,7 @@ default_sysctls = [
# List of the OCI runtimes that support --format=json. When json is supported
# engine will use it for reporting nicer errors.
#
-# runtime_supports_json = ["crun", "runc", "kata"]
+# runtime_supports_json = ["crun", "runc", "kata", "runsc"]
# List of the OCI runtimes that supports running containers without cgroups.
#
@@ -432,7 +437,7 @@ default_sysctls = [
# Path to file containing ssh identity key
# identity = "~/.ssh/id_rsa"
-# Paths to look for a valid OCI runtime (crun, runc, kata, etc)
+# Paths to look for a valid OCI runtime (crun, runc, kata, runsc, etc)
[engine.runtimes]
# crun = [
# "/usr/bin/crun",
@@ -465,6 +470,16 @@ default_sysctls = [
# "/usr/bin/kata-fc",
# ]
+# runsc = [
+# "/usr/bin/runsc",
+# "/usr/sbin/runsc",
+# "/usr/local/bin/runsc",
+# "/usr/local/sbin/runsc",
+# "/bin/runsc",
+# "/sbin/runsc",
+# "/run/current-system/sw/bin/runsc",
+# ]
+
[engine.volume_plugins]
# testplugin = "/run/podman/plugins/test.sock"
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 72744bb12..34a360bf5 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -278,6 +278,15 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
"/usr/bin/kata-qemu",
"/usr/bin/kata-fc",
},
+ "runsc": {
+ "/usr/bin/runsc",
+ "/usr/sbin/runsc",
+ "/usr/local/bin/runsc",
+ "/usr/local/sbin/runsc",
+ "/bin/runsc",
+ "/sbin/runsc",
+ "/run/current-system/sw/bin/runsc",
+ },
}
// Needs to be called after populating c.OCIRuntimes
c.OCIRuntime = c.findRuntime()
@@ -299,6 +308,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
c.RuntimeSupportsJSON = []string{
"crun",
"runc",
+ "kata",
+ "runsc",
}
c.RuntimeSupportsNoCgroups = []string{"crun"}
c.RuntimeSupportsKVM = []string{"kata", "kata-runtime", "kata-qemu", "kata-fc"}
@@ -314,6 +325,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
// TODO - ideally we should expose a `type LockType string` along with
// constants.
c.LockType = "shm"
+ c.MachineEnabled = false
return c, nil
}
@@ -524,3 +536,7 @@ func (c *Config) Umask() string {
func (c *Config) LogDriver() string {
return c.Containers.LogDriver
}
+
+func (c *Config) MachineEnabled() bool {
+ return c.Engine.MachineEnabled
+}
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index d9e7ffec7..cb1eb342d 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.37.0"
+const Version = "0.37.1"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d59b6b731..446081623 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -96,7 +96,7 @@ github.com/containers/buildah/pkg/parse
github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/supplemented
github.com/containers/buildah/util
-# github.com/containers/common v0.37.0
+# github.com/containers/common v0.37.1
github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/apparmor/internal/supported
github.com/containers/common/pkg/auth