-
Notifications
You must be signed in to change notification settings - Fork 30
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
Check rake environment #13
Conversation
toch
commented
Aug 15, 2015
- release task depends on compile task
- abort if not in a docker
- abort compile task if toolchain is not present
@toch Could you please rebase? |
28dd31b
to
62fd44a
Compare
@zzak rebase done |
Should I have to do something else? |
@toch I'm still curious why you had to manually This rake task will actually go away once we can merge my patch to extract the test binary stuff upstream in mruby, so your change will actually break (or something). What happens if you remove it? |
The error I got was: I cleaned everything, removed the load, and I ran again In the next commit, I removed the load from |
75a1ae9
to
2574f17
Compare
This will need a rebase as well |
2574f17
to
6ea1cc1
Compare
@zzak done |
@toch would it make sense to have this as a task dependency? Are there rake tasks that may make sense to run locally? task :docker do
abort("Not running in docker, you should type \"docker-compose run <task>\".") unless is_in_a_docker?
end
task :compile => :docker |
6ea1cc1
to
27cde5c
Compare
I've squashed the commits in two commits: one is about the compile task, the other about the abortion in case of not being run into a docker container. After discussion with @hone, it is possible to disable that check, so ppl that would like to run it locally can. @kbrock As setting up a cross toolchain is not easy, I think the idea is to not pull the user into that by default. I've added an option to disable that if you want to do it locally. @hone and @zzak am I wrong? |
@kbrock that's an interesting idea. @toch that's correct. thanks for squashing. I've added some local tasks. I wonder if this is a use case we should support? |
27cde5c
to
5a53cd5
Compare
|
Just an example of local rake tasks that can be run/added to a project in On Wed, Sep 30, 2015, 7:24 PM Christophe Philemotte <
|
I think it's a good idea to discuss that in another PR. I don't like to put to many changes in the same PR. |
8992579
to
79b4a5e
Compare
Due to the line 14 we The only issue is that the local uid and gid are hardcoded. I didn't find a way to resolve that. Do you know by chance how to do that? Inspired by @kbrock's idea, after several issues, I ended with the last commit: 79b4a5e
@hone @zzak what do you think of that new version? The test failure is the same @hone reported #23 + another one linked to |
|
||
RUN groupadd -r mruby -g 1000 && \ | ||
useradd -d /home/mruby/ -u 1000 -g mruby -r -s /sbin/nologin -c "Docker image mruby user" mruby && \ | ||
chown -R mruby:mruby /home/mruby/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in the upstream container?
I thought we had issues with this on OS X because how boot2docker deals with permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in the upstream container?
Of course, I put it there temporally so you can try it.
I thought we had issues with this on OS X because how boot2docker deals with permissions
I didn't know that. I'll try on OS X. thanks for the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zzak is it the issue you mentioned boot2docker/boot2docker#581 ?
by the way, new version of docker comes with interpolation, very helpful for a non static UID docker/compose#1532 (comment) (available in docker-compose 1.5)
FYI, the last commits should fix the broken tests. (ofc 8f8b76c is temporary) |
d25aef8
to
16b30e8
Compare
all docker-compose tasks are supported now, they will be pass to the script correctly setting the environment and the permission according the host permission. |
It's a bash script that is run in the container itself. It should work according my reading, I'll test that asap. And indeed, that would be nice to just do
It does what Docker should do :). Honestly, it's not so hacky, I use only standard tools and bash. |
According the doc, there is a a directive VOLUME for Dockerfile. |
I tried to install docker toolbox on my OsX in a VirtualBox ... I have a problem VT-x detection making impossible to run a VM inside a VM. :/ I'll try with a Windows in a VM. |
I can test on OS X and I still have a Windows 10 VM available for testing |
Thanks @zzak! Would be nice to find a way to test on each platforms easily. |
follow up of a call I had with @zzak today it has drifted too much :p |
yeah, the docker root permission stuff should be a separate PR. Let's take that out and I'm +1 for the rest of the PR. |
16b30e8
to
6e08660
Compare
@zzak @hone done, and I put the non-root solution for docker here https://github.com/toch/mruby-cli/tree/non-root-docker I'll open a separated PR about that. |
@toch Thank you!! I will test this out! <3 |
* release task depends on compile task * check the presence of toolchain before running the compile task * remove superfluoous load of mrbtest.rake
* abort the task if not run in-docker * env var MRUBY_CLI_LOCAL allows to run the rake task locally * local task can be added * refactoring of the check is-in-a-docker-container?
it seems that the options weren't correctly passed to the command.
6e08660
to
f240c09
Compare
rebased onto master to resovle conflict |
Merged in eef2885 |