Commit cb73461a authored by Akihiro Suda's avatar Akihiro Suda Committed by Brad Davidson

AkihiroSuda/containerd-fuse-overlayfs -> containerd/fuse-overlayfs-snapshotter

The repo has been moved. Signed-off-by: 's avatarAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
parent e672c988
...@@ -65,12 +65,12 @@ replace ( ...@@ -65,12 +65,12 @@ replace (
) )
require ( require (
github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0
github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/bronze1man/goStrongswanVici v0.0.0-20190828090544-27d02f80ba40 // indirect github.com/bronze1man/goStrongswanVici v0.0.0-20190828090544-27d02f80ba40 // indirect
github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340
github.com/containerd/containerd v1.4.1 github.com/containerd/containerd v1.5.0-beta.4
github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5 github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5
github.com/containerd/fuse-overlayfs-snapshotter v1.0.2
github.com/coreos/flannel v0.12.0 github.com/coreos/flannel v0.12.0
github.com/coreos/go-iptables v0.4.5 github.com/coreos/go-iptables v0.4.5
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
......
...@@ -25,8 +25,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy ...@@ -25,8 +25,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0 h1:LhS8BiMh7ULa6zkkF5XI6piLV5XVTR7mSm9j3hTUB/k=
github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8=
github.com/Azure/azure-sdk-for-go v43.0.0+incompatible h1:/wSNCu0e6EsHFR4Qa3vBEBbicaprEHMyyga9g8RTULI= github.com/Azure/azure-sdk-for-go v43.0.0+incompatible h1:/wSNCu0e6EsHFR4Qa3vBEBbicaprEHMyyga9g8RTULI=
github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
...@@ -152,6 +150,8 @@ github.com/containerd/console v1.0.0 h1:fU3UuQapBs+zLJu82NhR11Rif1ny2zfMMAyPJzSN ...@@ -152,6 +150,8 @@ github.com/containerd/console v1.0.0 h1:fU3UuQapBs+zLJu82NhR11Rif1ny2zfMMAyPJzSN
github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk=
github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/fuse-overlayfs-snapshotter v1.0.2 h1:Xy9Tkx0tk/SsMfLDFc69wzqSrxQHYEFELHBO/Z8XO3M=
github.com/containerd/fuse-overlayfs-snapshotter v1.0.2/go.mod h1:nRZceC8a7dRm3Ao6cJAwuJWPFiBPaibHiFntRUnzhwU=
github.com/containerd/go-cni v1.0.1 h1:VXr2EkOPD0v1gu7CKfof6XzEIDzsE/dI9yj/W7PSWLs= github.com/containerd/go-cni v1.0.1 h1:VXr2EkOPD0v1gu7CKfof6XzEIDzsE/dI9yj/W7PSWLs=
github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU=
github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 h1:PRTagVMbJcCezLcHXe8UJvR1oBzp2lG3CEumeFOLOds= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 h1:PRTagVMbJcCezLcHXe8UJvR1oBzp2lG3CEumeFOLOds=
......
...@@ -19,8 +19,8 @@ import ( ...@@ -19,8 +19,8 @@ import (
"strings" "strings"
"time" "time"
fuseoverlayfs "github.com/AkihiroSuda/containerd-fuse-overlayfs"
"github.com/containerd/containerd/snapshots/overlay" "github.com/containerd/containerd/snapshots/overlay"
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/rancher/k3s/pkg/agent/proxy" "github.com/rancher/k3s/pkg/agent/proxy"
"github.com/rancher/k3s/pkg/cli/cmds" "github.com/rancher/k3s/pkg/cli/cmds"
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
package containerd package containerd
import ( import (
_ "github.com/AkihiroSuda/containerd-fuse-overlayfs/plugin"
_ "github.com/containerd/containerd/metrics/cgroups" _ "github.com/containerd/containerd/metrics/cgroups"
_ "github.com/containerd/containerd/runtime/v1/linux" _ "github.com/containerd/containerd/runtime/v1/linux"
_ "github.com/containerd/containerd/runtime/v2" _ "github.com/containerd/containerd/runtime/v2"
_ "github.com/containerd/containerd/runtime/v2/runc/options" _ "github.com/containerd/containerd/runtime/v2/runc/options"
_ "github.com/containerd/containerd/snapshots/native" _ "github.com/containerd/containerd/snapshots/native"
_ "github.com/containerd/containerd/snapshots/overlay" _ "github.com/containerd/containerd/snapshots/overlay"
_ "github.com/containerd/fuse-overlayfs-snapshotter/plugin"
) )
DESTDIR ?= /usr/local
bin/containerd-fuse-overlayfs-grpc:
go build -o $@ ./cmd/containerd-fuse-overlayfs-grpc
install:
install bin/containerd-fuse-overlayfs-grpc $(DESTDIR)/bin
uninstall:
rm -f $(DESTDIR)/bin/containerd-fuse-overlayfs-grpc
clean:
rm -rf bin
test:
DOCKER_BUILDKIT=1 docker build -t containerd-fuse-overlayfs-test .
docker run --rm --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse containerd-fuse-overlayfs-test
docker rmi containerd-fuse-overlayfs-test
_test:
go test -exec rootlesskit -test.v -test.root
.PHONY: bin/containerd-fuse-overlayfs-grpc install uninstall clean test _test
module github.com/AkihiroSuda/containerd-fuse-overlayfs
go 1.13
require (
github.com/Microsoft/hcsshim v0.8.9 // indirect
github.com/containerd/containerd v1.4.0
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe
github.com/containerd/ttrpc v1.0.1 // indirect
github.com/containerd/typeurl v1.0.1 // indirect
github.com/coreos/go-systemd/v22 v22.1.0
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0 // indirect
go.etcd.io/bbolt v1.3.5 // indirect
google.golang.org/grpc v1.27.1
gotest.tools/v3 v3.0.2 // indirect
)
ARG FUSEOVERLAYFS_COMMIT=v1.2.0 # Copyright The containerd Authors.
ARG ROOTLESSKIT_COMMIT=v0.11.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG FUSEOVERLAYFS_COMMIT=master
ARG ROOTLESSKIT_COMMIT=v0.14.0
ARG SHADOW_COMMIT=4.8.1 ARG SHADOW_COMMIT=4.8.1
FROM golang:1.15-alpine AS containerd-fuse-overlayfs-test ARG GO_VERSION=1.16
COPY . /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs ARG DEBIAN_VERSION=10
WORKDIR /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs ARG ALPINE_VERSION=3.13
FROM golang:${GO_VERSION}-alpine AS containerd-fuse-overlayfs-test
COPY . /go/src/github.com/containerd/fuse-overlayfs-snapshotter
WORKDIR /go/src/github.com/containerd/fuse-overlayfs-snapshotter
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0
ENV GO111MODULE=off ENV GO111MODULE=on
RUN mkdir /out && go test -c -o /out/containerd-fuse-overlayfs.test RUN mkdir /out && go test -c -o /out/containerd-fuse-overlayfs.test
# from https://github.com/containers/fuse-overlayfs/blob/53c17dab78b43de1cd121bf9260b20b76371bbaf/Dockerfile.static.ubuntu # from https://github.com/containers/fuse-overlayfs/blob/53c17dab78b43de1cd121bf9260b20b76371bbaf/Dockerfile.static.ubuntu
FROM docker.io/debian:10 AS fuse-overlayfs FROM debian:${DEBIAN_VERSION} AS fuse-overlayfs
RUN apt-get update && \ RUN apt-get update && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
git ca-certificates libc6-dev gcc g++ make automake autoconf clang pkgconf libfuse3-dev git ca-certificates libc6-dev gcc g++ make automake autoconf clang pkgconf libfuse3-dev
ARG FUSEOVERLAYFS_REPO
RUN git clone https://github.com/containers/fuse-overlayfs RUN git clone https://github.com/containers/fuse-overlayfs
WORKDIR fuse-overlayfs WORKDIR fuse-overlayfs
ARG FUSEOVERLAYFS_COMMIT ARG FUSEOVERLAYFS_COMMIT
...@@ -23,7 +40,7 @@ RUN ./autogen.sh && \ ...@@ -23,7 +40,7 @@ RUN ./autogen.sh && \
LIBS="-ldl" LDFLAGS="-static" ./configure && \ LIBS="-ldl" LDFLAGS="-static" ./configure && \
make && mkdir /out && cp fuse-overlayfs /out make && mkdir /out && cp fuse-overlayfs /out
FROM golang:1.15-alpine AS rootlesskit FROM golang:${GO_VERSION}-alpine AS rootlesskit
RUN apk add --no-cache git RUN apk add --no-cache git
RUN git clone https://github.com/rootless-containers/rootlesskit.git /go/src/github.com/rootless-containers/rootlesskit RUN git clone https://github.com/rootless-containers/rootlesskit.git /go/src/github.com/rootless-containers/rootlesskit
WORKDIR /go/src/github.com/rootless-containers/rootlesskit WORKDIR /go/src/github.com/rootless-containers/rootlesskit
...@@ -32,7 +49,7 @@ RUN git pull && git checkout ${ROOTLESSKIT_COMMIT} ...@@ -32,7 +49,7 @@ RUN git pull && git checkout ${ROOTLESSKIT_COMMIT}
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0
RUN mkdir /out && go build -o /out/rootlesskit github.com/rootless-containers/rootlesskit/cmd/rootlesskit RUN mkdir /out && go build -o /out/rootlesskit github.com/rootless-containers/rootlesskit/cmd/rootlesskit
FROM alpine:3.12 AS idmap FROM alpine:${ALPINE_VERSION} AS idmap
RUN apk add --no-cache autoconf automake build-base byacc gettext gettext-dev gcc git libcap-dev libtool libxslt RUN apk add --no-cache autoconf automake build-base byacc gettext gettext-dev gcc git libcap-dev libtool libxslt
RUN git clone https://github.com/shadow-maint/shadow.git RUN git clone https://github.com/shadow-maint/shadow.git
WORKDIR shadow WORKDIR shadow
...@@ -41,7 +58,7 @@ RUN git pull && git checkout ${SHADOW_COMMIT} ...@@ -41,7 +58,7 @@ RUN git pull && git checkout ${SHADOW_COMMIT}
RUN ./autogen.sh --disable-nls --disable-man --without-audit --without-selinux --without-acl --without-attr --without-tcb --without-nscd && \ RUN ./autogen.sh --disable-nls --disable-man --without-audit --without-selinux --without-acl --without-attr --without-tcb --without-nscd && \
make && mkdir -p /out && cp src/newuidmap src/newgidmap /out make && mkdir -p /out && cp src/newuidmap src/newgidmap /out
FROM alpine:3.12 FROM alpine:${ALPINE_VERSION}
COPY --from=containerd-fuse-overlayfs-test /out/containerd-fuse-overlayfs.test /usr/local/bin COPY --from=containerd-fuse-overlayfs-test /out/containerd-fuse-overlayfs.test /usr/local/bin
COPY --from=rootlesskit /out/rootlesskit /usr/local/bin COPY --from=rootlesskit /out/rootlesskit /usr/local/bin
COPY --from=fuse-overlayfs /out/fuse-overlayfs /usr/local/bin COPY --from=fuse-overlayfs /out/fuse-overlayfs /usr/local/bin
......
# fuse-overlayfs-snapshotter maintainers
#
# As a containerd sub-project, containerd maintainers are also included from https://github.com/containerd/project/blob/master/MAINTAINERS.
# See https://github.com/containerd/project/blob/master/GOVERNANCE.md for description of maintainer role
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DESTDIR ?= /usr/local
VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
VERSION_TRIMMED := $(VERSION:v%=%)
REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
PKG_MAIN := github.com/containerd/fuse-overlayfs-snapshotter/cmd/containerd-fuse-overlayfs-grpc
PKG_VERSION := github.com/containerd/fuse-overlayfs-snapshotter/cmd/containerd-fuse-overlayfs-grpc/version
GO ?= go
export GO_BUILD=GO111MODULE=on CGO_ENABLED=0 $(GO) build -ldflags "-s -w -X $(PKG_VERSION).Version=$(VERSION) -X $(PKG_VERSION).Revision=$(REVISION)"
bin/containerd-fuse-overlayfs-grpc:
$(GO_BUILD) -o $@ $(PKG_MAIN)
install:
install bin/containerd-fuse-overlayfs-grpc $(DESTDIR)/bin
uninstall:
rm -f $(DESTDIR)/bin/containerd-fuse-overlayfs-grpc
clean:
rm -rf bin
test:
DOCKER_BUILDKIT=1 docker build -t containerd-fuse-overlayfs-test --build-arg FUSEOVERLAYFS_COMMIT=${FUSEOVERLAYFS_COMMIT} .
docker run --rm containerd-fuse-overlayfs-test fuse-overlayfs -V
docker run --rm --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse containerd-fuse-overlayfs-test
docker rmi containerd-fuse-overlayfs-test
_test:
go test -exec rootlesskit -test.v -test.root
TAR_FLAGS=--transform 's/.*\///g' --owner=0 --group=0
artifacts: clean
mkdir -p _output
GOOS=linux GOARCH=amd64 make
tar $(TAR_FLAGS) -czvf _output/containerd-fuse-overlayfs-$(VERSION_TRIMMED)-linux-amd64.tar.gz bin/*
GOOS=linux GOARCH=arm64 make
tar $(TAR_FLAGS) -czvf _output/containerd-fuse-overlayfs-$(VERSION_TRIMMED)-linux-arm64.tar.gz bin/*
GOOS=linux GOARCH=arm GOARM=7 make
tar $(TAR_FLAGS) -czvf _output/containerd-fuse-overlayfs-$(VERSION_TRIMMED)-linux-arm-v7.tar.gz bin/*
GOOS=linux GOARCH=ppc64le make
tar $(TAR_FLAGS) -czvf _output/containerd-fuse-overlayfs-$(VERSION_TRIMMED)-linux-ppc64le.tar.gz bin/*
GOOS=linux GOARCH=s390x make
tar $(TAR_FLAGS) -czvf _output/containerd-fuse-overlayfs-$(VERSION_TRIMMED)-linux-s390x.tar.gz bin/*
.PHONY: bin/containerd-fuse-overlayfs-grpc install uninstall clean test _test artifacts
# [`fuse-overlayfs`](https://github.com/containers/fuse-overlayfs) snapshotter plugin for [containerd](https://containerd.io) # [`fuse-overlayfs`](https://github.com/containers/fuse-overlayfs) snapshotter plugin for [containerd](https://containerd.io)
Unlike `overlayfs`, `fuse-overlayfs` can be used as a non-root user without patching the kernel. Unlike `overlayfs`, `fuse-overlayfs` can be used as a non-root user on almost all recent distros.
You do NOT need this `fuse-overlayfs` plugin on the following environments, because they support the real `overlayfs` for non-root users:
- [kernel >= 5.11](https://github.com/torvalds/linux/commit/459c7c565ac36ba09ffbf24231147f408fde4203)
- [Ubuntu kernel, since circa 2015](https://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/commit/fs/overlayfs?id=3b7da90f28fe1ed4b79ef2d994c81efbc58f1144)
- [Debian 10 kernel](https://salsa.debian.org/kernel-team/linux/blob/283390e7feb21b47779b48e0c8eb0cc409d2c815/debian/patches/debian/overlayfs-permit-mounts-in-userns.patch)
- Debian 10 needs `sudo modprobe overlay permit_mounts_in_userns=1`. Future release of Debian with kernel >= 5.11 will not need this `modprobe` hack.
fuse-overlayfs-snapshotter is a **non-core** sub-project of containerd.
## Requirements ## Requirements
* kernel >= 4.18 * kernel >= 4.18
...@@ -23,10 +31,13 @@ with the following content, and recompile the containerd binary: ...@@ -23,10 +31,13 @@ with the following content, and recompile the containerd binary:
```go ```go
/* /*
Copyright The containerd Authors. Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -36,8 +47,7 @@ with the following content, and recompile the containerd binary: ...@@ -36,8 +47,7 @@ with the following content, and recompile the containerd binary:
package main package main
// NOTE: the package name was "github.com/AkihiroSuda/containerd-fuse-overlayfs" before v1.0.0 import _ "github.com/containerd/fuse-overlayfs-snapshotter/plugin"
import _ "github.com/AkihiroSuda/containerd-fuse-overlayfs/plugin"
``` ```
No extra configuration is needed. No extra configuration is needed.
...@@ -46,6 +56,37 @@ See https://github.com/containerd/containerd/blob/master/docs/rootless.md for ho ...@@ -46,6 +56,37 @@ See https://github.com/containerd/containerd/blob/master/docs/rootless.md for ho
### Option 2: Execute `fuse-overlayfs` plugin as a separate binary ### Option 2: Execute `fuse-overlayfs` plugin as a separate binary
#### "Easy way"
The easiest way is to use `containerd-rootless-setuptool.sh` included in [nerdctl](https://github.com/containerd/nerdctl).
```console
$ containerd-rootless-setuptool.sh install
$ containerd-rootless-setuptool.sh install-fuse-overlayfs
[INFO] Creating "/home/exampleuser/.config/systemd/user/containerd-fuse-overlayfs.service"
...
[INFO] Installed "containerd-fuse-overlayfs.service" successfully.
[INFO] To control "containerd-fuse-overlayfs.service", run: `systemctl --user (start|stop|restart) containerd-fuse-overlayfs.service`
[INFO] Add the following lines to "/home/exampleuser/.config/containerd/config.toml" manually:
### BEGIN ###
[proxy_plugins]
[proxy_plugins."fuse-overlayfs"]
type = "snapshot"
address = "/run/user/1000/containerd-fuse-overlayfs.sock"
### END ###
[INFO] Set `export CONTAINERD_SNAPSHOTTER="fuse-overlayfs"` to use the fuse-overlayfs snapshotter.
```
Add the `[proxy_plugins."fuse-overlayfs"]` configuration shown above to `~/.config/containerd/config.toml`.
"1000" needs to be replaced with your actual UID.
#### "Hard way"
<details>
<summary>Click here to show the "hard way"</summary>
<p>
* Install `containerd-fuse-overlayfs-grpc` binary. The binary will be installed under `$DESTDIR/bin`. * Install `containerd-fuse-overlayfs-grpc` binary. The binary will be installed under `$DESTDIR/bin`.
```console ```console
$ make && DESTDIR=$HOME make install $ make && DESTDIR=$HOME make install
...@@ -90,12 +131,14 @@ $ nsenter -U --preserve-credentials -m -n -t $(cat $XDG_RUNTIME_DIR/rootlesskit- ...@@ -90,12 +131,14 @@ $ nsenter -U --preserve-credentials -m -n -t $(cat $XDG_RUNTIME_DIR/rootlesskit-
containerd -c $HOME/.config/containerd/config.toml containerd -c $HOME/.config/containerd/config.toml
``` ```
</p>
</details>
## Usage ## Usage
```console ```console
$ export CONTAINERD_SNAPSHOTTER=fuse-overlayfs $ export CONTAINERD_SNAPSHOTTER=fuse-overlayfs
$ ctr pull ... $ nerdctl run ...
$ ctr run ...
``` ```
## How to test ## How to test
...@@ -105,3 +148,12 @@ To run the test as a non-root user, [RootlessKit](https://github.com/rootless-co ...@@ -105,3 +148,12 @@ To run the test as a non-root user, [RootlessKit](https://github.com/rootless-co
```console ```console
$ go test -exec rootlesskit -test.v -test.root $ go test -exec rootlesskit -test.v -test.root
``` ```
## Project details
fuse-overlayfs-snapshotter is a containerd **non-core** sub-project, licensed under the [Apache 2.0 license](./LICENSE).
As a containerd non-core sub-project, you will find the:
* [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
* [Maintainers](./MAINTAINERS),
* and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
information in our [`containerd/project`](https://github.com/containerd/project) repository.
module github.com/containerd/fuse-overlayfs-snapshotter
go 1.16
require (
github.com/containerd/containerd v1.5.0-beta.4
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e
github.com/coreos/go-systemd/v22 v22.1.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.7.0
google.golang.org/grpc v1.33.2
)
// replace grpc to match https://github.com/containerd/containerd/blob/master/go.mod
replace google.golang.org/grpc => google.golang.org/grpc v1.27.1
...@@ -21,9 +21,9 @@ package fuseoverlayfs ...@@ -21,9 +21,9 @@ package fuseoverlayfs
import ( import (
"errors" "errors"
fuseoverlayfs "github.com/AkihiroSuda/containerd-fuse-overlayfs"
"github.com/containerd/containerd/platforms" "github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/plugin" "github.com/containerd/containerd/plugin"
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter"
) )
// Config represents configuration for the fuse-overlayfs plugin. // Config represents configuration for the fuse-overlayfs plugin.
......
# cloud.google.com/go v0.54.0 # cloud.google.com/go v0.54.0
cloud.google.com/go/compute/metadata cloud.google.com/go/compute/metadata
# github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0
## explicit
github.com/AkihiroSuda/containerd-fuse-overlayfs
github.com/AkihiroSuda/containerd-fuse-overlayfs/plugin
# github.com/Azure/azure-sdk-for-go v43.0.0+incompatible # github.com/Azure/azure-sdk-for-go v43.0.0+incompatible
github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute
github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice
...@@ -178,7 +174,7 @@ github.com/containerd/cgroups/v2 ...@@ -178,7 +174,7 @@ github.com/containerd/cgroups/v2
github.com/containerd/cgroups/v2/stats github.com/containerd/cgroups/v2/stats
# github.com/containerd/console v1.0.0 => github.com/containerd/console v1.0.0 # github.com/containerd/console v1.0.0 => github.com/containerd/console v1.0.0
github.com/containerd/console github.com/containerd/console
# github.com/containerd/containerd v1.4.1 => github.com/k3s-io/containerd v1.4.4-k3s1 # github.com/containerd/containerd v1.5.0-beta.4 => github.com/k3s-io/containerd v1.4.4-k3s1
## explicit ## explicit
github.com/containerd/containerd github.com/containerd/containerd
github.com/containerd/containerd/api/events github.com/containerd/containerd/api/events
...@@ -314,7 +310,7 @@ github.com/containerd/containerd/snapshots/storage ...@@ -314,7 +310,7 @@ github.com/containerd/containerd/snapshots/storage
github.com/containerd/containerd/sys github.com/containerd/containerd/sys
github.com/containerd/containerd/sys/reaper github.com/containerd/containerd/sys/reaper
github.com/containerd/containerd/version github.com/containerd/containerd/version
# github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe => github.com/k3s-io/continuity v0.0.0-20210309170710-f93269e0d5c1 # github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e => github.com/k3s-io/continuity v0.0.0-20210309170710-f93269e0d5c1
github.com/containerd/continuity github.com/containerd/continuity
github.com/containerd/continuity/devices github.com/containerd/continuity/devices
github.com/containerd/continuity/driver github.com/containerd/continuity/driver
...@@ -353,6 +349,10 @@ github.com/containerd/cri/pkg/streaming/remotecommand ...@@ -353,6 +349,10 @@ github.com/containerd/cri/pkg/streaming/remotecommand
github.com/containerd/cri/pkg/util github.com/containerd/cri/pkg/util
# github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c # github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
github.com/containerd/fifo github.com/containerd/fifo
# github.com/containerd/fuse-overlayfs-snapshotter v1.0.2
## explicit
github.com/containerd/fuse-overlayfs-snapshotter
github.com/containerd/fuse-overlayfs-snapshotter/plugin
# github.com/containerd/go-cni v1.0.1 # github.com/containerd/go-cni v1.0.1
github.com/containerd/go-cni github.com/containerd/go-cni
# github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 => github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 # github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 => github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment