Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superuser permission when building Meteor #122

Open
Fredeli opened this issue Jun 2, 2017 · 5 comments
Open

Superuser permission when building Meteor #122

Fredeli opened this issue Jun 2, 2017 · 5 comments

Comments

@Fredeli
Copy link

Fredeli commented Jun 2, 2017

Hello everyone,

while building the image i am having this error:

Building meteor
Step 1/3 : FROM meteorhacks/meteord:onbuild

Executing 2 build triggers...

Step 1/1 : COPY ./ /app
Step 1/1 : RUN bash $METEORD_DIR/on_build.sh
---> Running in 55ced4f8b87a
Downloading Meteor distribution

Meteor 1.5 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.

To get started fast:

$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor

Or see the docs at:

docs.meteor.com

You are attempting to run Meteor as the 'root' superuser. 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 command
in a build process (CI, etc.), or you are absolutely sure you know what you are
doing, set the METEOR_ALLOW_SUPERUSER environment variable or pass
--allow-superuser to proceed.

Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app
directory will be incorrect if you ever attempt to perform any Meteor tasks as
a normal user. If you need to fix your permissions, run the following command
from the root of your project:

sudo chown -Rh .meteor/local

ERROR: Service 'meteor' failed to build: The command '/bin/sh -c bash $METEORD_DIR/on_build.sh' returned a non-zero code: 1

I assumed that the reason is that i created the project locally on my machine and then everything is copied into "/app" in the container. Thus the owner of ".meteor" is root. To avoid this i added ".meteor/local" to my .dockerignore. But still the error remains...

@xinlovedong
Copy link

I have the same trouble with you. Do you solve the problem?h

@Fredeli
Copy link
Author

Fredeli commented Jul 11, 2017

I solved it using meteor --allow-superuser as my CMD. Also when adding packages i had to add --allow-superuser, e.g. meteor add nimble:restivus --allow-superuser.

Hope it helps :)

@xinlovedong
Copy link

Thank you very much, now I run meteor locally by this way. But it still does not work when I run in the
Linux Ubuntu server. In a word, thanks

@LiuSuY
Copy link

LiuSuY commented Jan 7, 2019

我用meteor --allow-superuser我的CMD 解决了它。此外,当我添加必须添加的包时--allow-superuser,例如meteor add nimble:restivus --allow-superuser

希望能帮助到你 :谢谢你,你的这个方法是可以的,但是每次都要加 --allow-superuser 有点麻烦,有没有更好的解决方法呢,如果有请告知,如果没有也很感谢你,起码你的这个方法让我的demo跑了起来

@stvenyin
Copy link

it's solved this problem
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants