https://github.com/rolandjitsu/containerd-oci-import
Export OCI images for use in containerd on a Raspberry Pi.
https://github.com/rolandjitsu/containerd-oci-import
containerd oci-image raspberry-pi
Last synced: 2 months ago
JSON representation
Export OCI images for use in containerd on a Raspberry Pi.
- Host: GitHub
- URL: https://github.com/rolandjitsu/containerd-oci-import
- Owner: rolandjitsu
- License: mit
- Created: 2020-12-06T09:13:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-06T09:54:39.000Z (over 5 years ago)
- Last Synced: 2026-03-30T07:59:11.429Z (3 months ago)
- Topics: containerd, oci-image, raspberry-pi
- Language: Go
- Homepage: https://rolandsdev.blog/install-containerd-on-raspberry-pi
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ContainerD OCI Import
> Build and export docker images as OCI for use with containerD on a Raspberry Pi.
[](https://github.com/rolandjitsu/containerd-oci-import/actions?query=workflow%3ATest)
## Build
Build and export an OCI image with [buildx](https://github.com/docker/buildx#buildx-build-options-path--url---):
```bash
docker buildx build --platform=linux/arm/v7 --tag hello -o type=oci,dest=- . > hello.tar
```
**NOTE**: If you have [buildkit](https://github.com/moby/buildkit) installed, you can use that.
## Import
Copy the image to the pi:
```bash
scp ./hello.tar pi@raspberrypi.local:
```
On the pi, import the image with `ctr`:
```bash
sudo ctr -n=example images import hello.tar
```
**NOTE**: We use the `example` namespace, but could just use the `default` one too.
The image should be available as `docker.io/library/hello:latest` after imported.
## Use
Copy the `main.go` file to the pi:
```go
scp ./main.go pi@raspberrypi.local:
```
Build it:
```bash
go build main.go
```
And run it:
```bash
sudo ./main
```
Or build it locally and copy it to the pi:
```bash
GOARCH=arm GOOS=linux go build -o main ./main.go
scp ./main pi@raspberrypi.local:
sudo ./main
```