Skip to content

oci-runtime-compose

Create OCI runtime configuration files from Docker compose file.

Requirements

See INSTALL.md for installation details.

Installation

System installation for all users

sudo make install

Installation for current user only

make PREFIX=$HOME install

Usage

oci-runtime-compose [options]
Options:
    -f, --file FILE       Specify an alternate compose file (default: docker-compose.yaml)
    -b, --bundle-dir DIR  Specify an alternate bundle directory (default: current dir)

Supported compose configurations

This is a list of supported compose file options. Options not listed here are still ignored.

The compose file reference can be found here.

Options marked with [*] are extensions and not compatible with Docker Compose.

services

For every service a subdirectory within the bundle directory is created.

Supported service options:

build

cap_add, cap_drop

command

cpus

cpuset

cpu_period

cpu_quota

cpu_shares

environment

hostname

image

mem_limit

mem_reservation

mem_swappiness

memswap_limit

networks

Configure a private network inside for inter-container communication with

networks:
  inside:
    driver: bridge

Configure a network machinelan0 connected to interface machinelan0 with

networks:
  machinelan0:
    external: true

Other options like aliases, ipv4_address, ... are not supported.

oom_kill_disable

oom_score_adj

ports

Only the following formats are supported:

  • HOST:CONTAINER
  • HOST:CONTAINER/PROTOCOL
  • INTERFACE:HOST:CONTAINER
  • INTERFACE:HOST:CONTAINER/PROTOCOL

If INTERFACE is omitted then port is bound to an interface which has a route to default gateway otherwise to the specified network device on the host (e.g. machinelan0).

The Docker Compose compatible format

  • IPADDR:HOST:CONTAINER
  • IPADDR:HOST:CONTAINER/PROTOCOL

is not supported!

read_only

rootfs [*]

Specify a local directory, a local compressed tar file or an URL of a remote compressed tar file to extract the root filesystem from.

tmpfs

tty

user

volumes

working_dir

networks

driver

Only the following drivers are supported:

  • bridge
  • macvlan

driver_opts

Driver dependent options. Supported by the macvlan network driver.

networks:
  mylan:
    driver: macvlan
    driver_opts:
      parent: machinelan0

external

Specify a network connected to the physical interface with the same name.

networks:
  machinelan0:
    external: true

ipam

Supported by the macvlan network driver.

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the The Siemens Inner Source License - 1.1.