containers / build

another build tool for container images (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
342 stars 80 forks source link

acbuild script does not work #275

Open dimas opened 7 years ago

dimas commented 7 years ago

In the same directory:

# acbuild run -- ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

# echo run -- ls > scr

# cat scr
run -- ls

# acbuild script scr
Running: [ls]
run: no build in progress in this working dir - try "acbuild begin"
script: no build in progress in this working dir - try "acbuild begin"
script: exit status 1

# acbuild run -- ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
cgonyeo commented 7 years ago

Even in script mode the begin command is still necessary.

Take a look at the example here: https://github.com/containers/build/blob/master/Documentation/subcommands/script.md#example

cgonyeo commented 7 years ago

And after reading over IRC backlog I should probably also mention that an acbuild script runs in an ephemeral directory under /tmp, so any build you have in progress in the current directory isn't touched by the acbuild script command.

dimas commented 7 years ago

Oh. I misunderstood it then. Couple of notes though:

cgonyeo commented 7 years ago

I think I could make it less misleading by changing the language in acbuild --help. Right now it says "Runs an acbuild script", maybe "Run a build with steps specified in a file" would be clearer?

There's also nothing stopping users from directly using acbuild-script, I'm not sure how I feel about making it the only way to use scripts though.