Arion options

docker-compose.extended

Attribute set that will be turned into the x-arion section of the docker-compose.yaml file.

details

Type

attribute set

No Default

No Example

docker-compose.raw

Attribute set that will be turned into the docker-compose.yaml file, using Nix’s toJSON builtin.

details

Type

attribute set

No Default

No Example

host.nixStorePrefix

Prefixes store paths on the host, allowing the Nix store to be stored at an alternate location without altering the format of store paths.

For example: instead of mounting the host’s /nix/store as the container’s /nix/store, this will mount /mnt/foo/nix/store as the container’s /nix/store.

details

Type

string

Default
""
Example
"/mnt/foo"

host.uid

The numeric user id (UID) of the user running arion.

This lets you to write modules that interact with the host user’s files, which is helpful for local development, but not intended for production-like deployment scenarios.

details

Type

signed integer

No Default

No Example

out.dockerComposeYaml

A derivation that produces a docker-compose.yaml file for this composition.

details

Type

package

No Default

Read Only

No Example

out.dockerComposeYamlAttrs

The text of out.dockerComposeYaml.

details

Type

attribute set of unspecifieds

No Default

Read Only

No Example

out.dockerComposeYamlText

The text of out.dockerComposeYaml.

details

Type

string

No Default

Read Only

No Example

services

An attribute set of service configurations. A service specifies how to run an image as a container.

details

Type

attribute set of submodules

No Default

No Example

services.<name>.composition

The composition configuration.

details

Type

attribute set

No Default

Read Only

No Example

services.<name>.host

The composition-level host option values.

details

Type

attribute set

No Default

Read Only

No Example

services.<name>.image.command

details

Type

list of strings

Default
[]
No Example

services.<name>.image.contents

Top level paths in the container.

details

Type

list of packages

Default
[]
No Example

services.<name>.image.name

A human readable name for the docker image.

Shows up in the docker ps output in the IMAGE column, among other places.

details

Type

string

Default
{"_type":"literalExample","text":"config.service.name"}
No Example

services.<name>.image.nixBuild

Whether to build this image with Nixpkgs' dockerTools.buildLayeredImage and then load it with docker load.

By default, an image will be built with Nix unless service.image is set. See also image.name, which defaults to the service name.

details

Type

boolean

No Default

No Example

services.<name>.image.rawConfig

This is a low-level fallback for when a container option has not been modeled in the Arion module system.

This attribute set does not have an appropriate merge function. Please use the specific image options instead.

Run-time configuration of the container. A full list of the options is available in the Docker Image Specification v1.2.0.

details

Type

attribute set of unspecifieds

Default
{}
No Example

services.<name>.nixos.build

NixOS build products from config.system.build, such as toplevel and etc.

This option is unused by default, because not all images use NixOS.

One way to use this is to enable nixos.useSystemd, but the NixOS configuration can be used in other ways.

details

Type

attribute set

No Default

Read Only

No Example

services.<name>.nixos.configuration

Modules to add to the NixOS configuration.

This option is unused by default, because not all images use NixOS.

One way to use this is to enable nixos.useSystemd, but the NixOS configuration can be used in other ways.

details

Type

list of unspecifieds or unspecified convertible to it

Default
{}
No Example

services.<name>.nixos.evaluatedConfig

Evaluated NixOS configuration, to be read by service-level modules.

This option is unused by default, because not all images use NixOS.

One way to use this is to enable nixos.useSystemd, but the NixOS configuration can be used in other ways.

details

Type

attribute set

No Default

Read Only

No Example

services.<name>.nixos.useSystemd

When enabled, call the NixOS systemd-based init system.

Configure NixOS with the nixos.configuration option.

details

Type

boolean

Default
false
No Example

services.<name>.out.extendedInfo

Information about a service to include in the Docker Compose file, but that will not be used by the docker-compose> command itself.

It will be inserted in x-arion.serviceInfo.<service.name>.

details

Type

attribute set of unspecifieds

Default
{}
No Example

services.<name>.out.service

Raw input for the service in docker-compose.yaml.

You should not need to use this option. If anything is missing, please contribute the missing option.

This option is user accessible because it may serve as an escape hatch for some.

details

Type

attribute set of unspecifieds

No Default

No Example

services.<name>.service.build.context

Locates a Dockerfile to use for creating an image to use in this service.

details

Type

null or string

Default
null
No Example

services.<name>.service.capabilities

Enable/disable linux capabilities, or pick Docker’s default.

Setting a capability to true means that it will be "added". Setting it to false means that it will be "dropped". See Docker Compose#cap_add-cap_drop

Omitted and null capabilities will therefore be set according to Docker’s default list of capabilities.

details

Type

attribute set of null or booleans

Default
{}
Example
{"ALL":true,"NET_ADMIN":false,"SYS_ADMIN":false}

services.<name>.service.command

details

Type

null or unspecified

Default
null
No Example

services.<name>.service.container_name

details

Type

null or string

Default
null
No Example

services.<name>.service.defaultExec

Container program and arguments to invoke when calling arion exec <service.name> without further arguments.

details

Type

list of strings

Default
["/bin/sh"]
No Example

services.<name>.service.depends_on

details

Type

list of strings

Default
[]
No Example

services.<name>.service.devices

details

Type

list of strings

Default
[]
No Example

services.<name>.service.entrypoint

details

Type

null or string

Default
null
No Example

services.<name>.service.env_file

details

Type

list of strings

Default
[]
No Example

services.<name>.service.environment

details

Type

attribute set of string or signed integers

Default
{}
No Example

services.<name>.service.expose

details

Type

list of strings

Default
[]
No Example

details

Type

list of strings

Default
[]
No Example

services.<name>.service.extra_hosts

details

Type

list of strings

Default
[]
No Example

services.<name>.service.hostStoreAsReadOnly

Adds a ':ro' (read-only) access mode to the host nix store bind mount.

details

Type

boolean

Default
true
No Example

services.<name>.service.hostname

Analogous to the docker run counterpart.

details

Type

null or string

Default
null
No Example

services.<name>.service.image

details

Type

string

No Default

No Example

details

Type

list of strings

Default
[]
No Example

services.<name>.service.name

The name of the service - <name> in the composition-level services.<name>

details

Type

string

No Default

Read Only

No Example

services.<name>.service.network_mode

details

Type

null or string

Default
null
No Example

services.<name>.service.networks

details

Type

null or list of strings

Default
null
No Example

services.<name>.service.ports

Expose ports on host. "host:container" or structured.

details

Type

list of unspecifieds

Default
[]
No Example

services.<name>.service.privileged

Analogous to the docker run counterpart.

details

Type

null or boolean

Default
null
No Example

services.<name>.service.restart

details

Type

null or string

Default
null
No Example

services.<name>.service.stop_signal

details

Type

null or string

Default
null
No Example

services.<name>.service.sysctls

details

Type

attribute set of string or signed integers

Default
{}
No Example

services.<name>.service.tmpfs

details

Type

list of strings

Default
[]
No Example

services.<name>.service.tty

Analogous to the docker run counterpart.

details

Type

null or boolean

Default
null
No Example

services.<name>.service.useHostNixDaemon

Make the host Nix daemon available.

details

Type

boolean

Default
false
No Example

services.<name>.service.useHostStore

Bind mounts the host store if enabled, avoiding copying.

details

Type

boolean

Default
false
No Example

services.<name>.service.user

Analogous to the docker run counterpart.

details

Type

null or string

Default
null
No Example

services.<name>.service.volumes

details

Type

list of unspecifieds

Default
[]
No Example

services.<name>.service.working_dir

Analogous to the docker run counterpart.

details

Type

null or string

Default
null
No Example