2016-09-28 46 views
0

我試圖做一個RKT容器中的簡單的Ruby應用程序,但我的構建腳本一直給我的變化上:如何解決Rkt的systemd-nspawn符號鏈接問題?

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 

誰能告訴我通常的方式來解決此問題?

這裏是我的構建腳本:

#!/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 

請注意,我脫殼而出這裏(acbuild run -- /bin/sh -c...),因爲當它作爲root運行捆綁抱怨。但符號鏈接似乎是一個非常普遍的問題。例如,如果我通過acbuild run -- apk add安裝打捆,腳本抱怨bundle是一個符號鏈接...

回答

0

升級到systemd版本比230

+0

我希望爲230解決方法時,我想。但是從這裏的評論缺乏我猜測沒有一個。所以你的回答顯然是正確的。 –