2016-10-26 7 views
2

に流星アプリを構築するとき、私はドッキングウィンドウ

RUN ["meteor", "build", "--directory", "/meteor_app"] 

とdockerfileに流星アプリのイメージを構築し、次のエラー会った「あなたはrootとして流星を実行した」:--unsafe--perm

Step 11 : RUN meteor build --directory /meteor_app 
---> Running in 2be64a8e21df 
You are attempting to run Meteor as the "root" user. If you are developing, 
this is almost certainly *not* what you want to do and will likely result in 
incorrect file permissions. However, if you are running this in a build process 
(CI, etc.) or you are absolutely sure you know what you are doing, add the 
`--unsafe-perm` flag to this command to proceed. 
The command 'meteor build --directory /meteor_app' returned a non-zero code: 1 
{"exitCode":8, "message":"docker build failed or timeout "} 

をフラグが追加されました:

RUN ["meteor", "--unsafe-perm", "build", "--directory", "/meteor_app"] 

エラーがまだ存在する:

を210
Step 11 : RUN meteor --unsafe-perm build --directory /meteor_app 
---> Running in c0e79de335c7 
You have run Meteor as root. Your permissions in your app directory will be 
incorrect if you ever attempt to perform any Meteor tasks as your non-root 
user. You probably didn't want this, but you can fix it by running the 
following from the root of your project: 
sudo chown -Rh <username> .meteor/local 
'/meteor_app' is not a Meteor command. See 'meteor --help'. 
The command 'meteor --unsafe-perm build --directory /meteor_app' returned a non-zero code: 1 
{"exitCode":8, "message":"docker build failed or timeout "} 

これを修正するにはどうすればよいですか?

このエラーはMeteor 1.4.2の後に発生しますが、ドキュメントが見つかりませんでした。

ありがとうございます!

答えて

0

コンテナにユーザーを作成し、USERコマンドで切り替えて流星をそこから実行することでこの問題を解決できます。すべてをrootとして実行するよりも良い方法です。

+2

これを行う方法の手順を教えてください。私はmeteorhacks/meteordを使用しています:onbuild –

2

どうやらrootユーザーとしてmeteor'sアプリのルートディレクトリから次のコマンドを実行している解決

...セキュリティ上の理由から、ルート構築を禁止自動流星のアップデートです:

export METEOR_NO_RELEASE_CHECK=true 
curl https://install.meteor.com/?release=1.4.1.3 | sh 

注:あなたあなたの選択の流星リリースを指定することができます。

More info about this issue

関連する問題