Runc: Difference between revisions

From Alpine Linux
(tested and updated the instructions)
(added category and link to)
Line 14: Line 14:
{{Cmd|# cd /opt/busybox-container && runc spec}}
{{Cmd|# cd /opt/busybox-container && runc spec}}
{{Cmd|# runc run busybox-1}}
{{Cmd|# runc run busybox-1}}
== See also ==
* [https://github.com/opencontainers/runc/tree/main?tab=readme-ov-file#using-runc Official User Guide]
[[Category:Virtualization]]

Revision as of 15:53, 4 July 2025

Runc is a CLI tool for spawning and running containers on Linux according to the OCI specification. This page provides instructions to setup containers using runc.

Prerequisites

Set up a minimal container

Here are the steps to create a minimal container using runc and Alpine Linux.

# apk add runc

# mkdir /opt/busybox-container

# apk --arch x86_64 -X https://dl-cdn.alpinelinux.org/alpine/edge/main/ --root /opt/busybox-container/rootfs --initdb --no-cache --allow-untrusted add busybox

# cd /opt/busybox-container && runc spec

# runc run busybox-1

See also