hercules-ci / arion

Run docker-compose with help from Nix/NixOS
Apache License 2.0
667 stars 48 forks source link

flake example doesn't work #136

Closed winston0410 closed 3 years ago

winston0410 commented 3 years ago

I am trying to flake example with arion up, but it doesn't work. It seems like sh is not in path.

{
  "architecture": "amd64",
  "config": {
    "Cmd": []
  },
  "os": "linux",
  "store_layers": [],
  "customisation_layer": "/nix/store/pllb3j1j8jnzyglff1zlcbg210rajj5y-webserver-customisation-layer",
  "repo_tag": "webserver:73ghmd6a0b6hlgas3338k4rrwrm9d2p6",
  "created": "1970-01-01T00:00:01+00:00"
}
building '/nix/store/ziy7f8x8a68w2pjlws4c8qs5ir2k4qrz-stream.drv'...
building '/nix/store/0gk82l28zn6hwlxz1wgacjdxcziqwiia-stream-webserver.drv'...
building '/nix/store/94n36q6jfxhbwgf666vvm8v870g44sdg-docker-compose.yaml.drv'...
/nix/store/42jc2sh946mnkkxxpgc72yhljjij8098-docker-compose.yaml
Creating the customisation layer...
Adding manifests...
Done.
Loaded image: localhost/webserver:73ghmd6a0b6hlgas3338k4rrwrm9d2p6
Creating network "webapp_default" with the default driver
Creating webapp_webserver_1 ... error

ERROR: for webapp_webserver_1  error preparing container 6fa60de08f9b04333b70c6212d19777d1488f2afa3fa9261ac55936a741c9ea1 for attach: executable file `sh` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found

ERROR: for webserver  error preparing container 6fa60de08f9b04333b70c6212d19777d1488f2afa3fa9261ac55936a741c9ea1 for attach: executable file `sh` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
ERROR: Encountered errors while bringing up the project.

And I have searched nixpkgs, but I cannot find pkgs.sh. How can we resolve this issue?

roberth commented 3 years ago

This should be a matter of adding a /bin/sh symlink to ${bash}/bin/sh in image.contents

winston0410 commented 3 years ago

Thank you for your prompt response. Let me fix this in a PR.

winston0410 commented 3 years ago

Addressed in https://github.com/hercules-ci/arion/pull/137