Skip to content

Minimal example not working  #175

@afiore

Description

@afiore

Hi there,

I am trying to use Arion but I have run into an issue when executing the minimal example presented the project docs.

I am using Nix on an Ubuntu machine, and I have installed Arion via home-manager.

When I run arion up in the minimal example folder, I get the following error:

➜ arion up
trace: warning: The check argument to evalModules is deprecated. Please set config._module.check instead.
/nix/store/mhqwamwimfilhwfsglsgrr0g7k7d6akv-docker-compose.yaml
Starting minimal_webserver_1 ... error

ERROR: for minimal_webserver_1  Cannot start service webserver: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown

ERROR: for webserver  Cannot start service webserver: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown
ERROR: Encountered errors while bringing up the project.

Details:

  • the attached docker-compose file generated by Airon seems correct, as I can access the python executable in /nix/store/fkcl1wzq3106qqgl84bhgk1lp56q6bzg-python3-3.10.7/bin/python.
  • Docker and docker-compose haven't been built / installed via nix. Their respective versions are
    • Docker version 20.10.12, build 20.10.12-0ubuntu4
    • Docker Compose version v2.5.0

Generated docker-compose.yaml:

{
  "services": {
    "webserver": {
      "command": [
        "sh",
        "-c",
        "cd \"$$WEB_ROOT\"\n/nix/store/fkcl1wzq3106qqgl84bhgk1lp56q6bzg-python3-3.10.7/bin/python -m http.server\n"
      ],
      "environment": {
        "NIX_REMOTE": "",
        "WEB_ROOT": "/nix/store/qdx3cy9691y429l0qw3hgbshyh9g1v71-nix-2.11.0-doc/share/doc/nix/manual"
      },
      "image": "webserver:xa0d0b0bq98d6b7ppqsmbacir5cqz5ax",
      "ports": [
        "8000:8000"
      ],
      "sysctls": {},
      "volumes": [
        "/nix/store:/nix/store:ro"
      ]
    }
  },
  "version": "3.4",
  "x-arion": {
    "images": [
      {
        "imageExe": "/nix/store/vjdc5izv8gr48bb5bdkspvk10bqpx1ff-stream-webserver",
        "imageName": "webserver",
        "imageTag": "xa0d0b0bq98d6b7ppqsmbacir5cqz5ax"
      }
    ],
    "project": {
      "name": null
    },
    "serviceInfo": {
      "webserver": {
        "defaultExec": [
          "/bin/sh"
        ]
      }
    }
  }
}

Finally, in case this helps somehow, here is the output of docker inspect webserver:xa0d0b0bq98d6b7ppqsmbacir5cqz5ax:

[
    {
        "Id": "sha256:8a1665b0a28cceba84b7b486fa043508b8f4099522fba29b0d5207cc63e53e1c",
        "RepoTags": [
            "webserver:xa0d0b0bq98d6b7ppqsmbacir5cqz5ax"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "store paths: ['/nix/store/f4vbg73h0pqmqap1c77absj6zv2kriyr-webserver-customisation-layer']",
        "Created": "1970-01-01T00:00:01Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": [],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 8433762,
        "VirtualSize": 8433762,
        "GraphDriver": {
            "Data": {
                "MergedDir": "/var/lib/docker/overlay2/2626a4ea4feee9c9c9edd92323032e12cccc4e37570af7e0e1c20b31ed2887ce/merged",
                "UpperDir": "/var/lib/docker/overlay2/2626a4ea4feee9c9c9edd92323032e12cccc4e37570af7e0e1c20b31ed2887ce/diff",
                "WorkDir": "/var/lib/docker/overlay2/2626a4ea4feee9c9c9edd92323032e12cccc4e37570af7e0e1c20b31ed2887ce/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:f6bbbe496f177b097df8026a4a3805ef80c9e5af404b8efdab24f368f17cee66"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions