I'm trying to make a simple Ruby app in a Rkt container, but my build script keeps giving me variations on:
Warning: "/bin/sh" is a symlink, which systemd-nspawn version 219 might error on
Directory /too/long/for/so/.acbuild/target lacks the binary to execute or doesn't
look like a binary tree. Refusing.
run: non-zero exit code: 1
Ending the build
Can anyone tell me the usual way to work around this?
Here is my build script:
#!/usr/bin/env bash
set -e
acbuildend () {
export EXIT=$?;
acbuild --debug end && exit $EXIT;
}
acbuild --debug begin
trap acbuildend EXIT
rm -f sputnik2.aci
acbuild set-name jhallpr.com/sputnik
acbuild dependency add quay.io/coreos/alpine-sh
acbuild run -- apk update
acbuild run -- apk add ruby ruby-io-console
acbuild copy-to-dir ./sputnik2 /usr/src/app/sputnik2
acbuild set-working-directory /usr/src/app/sputnik2
acbuild run -- gem install bundler --no-doc --no-ri
acbuild run -- /bin/sh -c "bundle install" # <-- *falls over here*
acbuild set-exec -- /usr/bin/ruby sputnik2.rb
acbuild write sputnik2.aci
Note that I'm shelling out here (acbuild run -- /bin/sh -c...
) because bundler complains when it is run as root. But the symlink thing seems to be a very common problem. For example, if I install bundler via acbuild run -- apk add
, the script complains that bundle
is a symlink...
upgrade to systemd version greater than 230.