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

Build dependencies during building Docker image #707

Merged
merged 5 commits into from Jan 6, 2016

Conversation

ryotarai
Copy link
Contributor

Currently, make deps is required before docker build and node and npm must be installed in build server for make deps. After merging this PR, make deps will run in a Docker container during building an image.

In addition, bower and grunt-cli are development dependencies and they should not be installed system-globally, so I added them into devDependencies and run them via npm run.

@ryotarai
Copy link
Contributor Author

I'm sorry this PR is broken... I'll fix it.

@ryotarai
Copy link
Contributor Author

I'm sorry this PR is broken... I'll fix it.

Fixed. Please review.

@arikfr
Copy link
Member

arikfr commented Dec 15, 2015

Thanks! I wanted to avoid having to install Node.JS on the server, but I guess it's not a big deal and it will simplify the usage of the docker image.

Why did you need to run supervisord as root?

@ryotarai
Copy link
Contributor Author

I wanted to avoid having to install Node.JS on the server, but I guess it's not a big deal and it will simplify the usage of the docker image.

I agree avoiding to make node.js installed is better. I uninstalled node.js and tried to reduce image size with these commits 15f9a06 and ec41077

  • b242dbb (master branch): 507.8 MB
  • a15085d (before reduce): 737.8 MB
  • ec41077 (after reduce): 665.2 MB

Why did you need to run supervisord as root?

When running supervisord as redash user, the following error occurs.

2015-12-15 13:00:00,658 INFO RPC interface 'supervisor' initialized
2015-12-15 13:00:00,659 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2015-12-15 13:00:00,660 INFO supervisord started with pid 1
Traceback (most recent call last):
  File "/usr/local/bin/supervisord", line 9, in <module>
    load_entry_point('supervisor==3.1.2', 'console_scripts', 'supervisord')()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/supervisord.py", line 366, in main
    go(options)
  File "/usr/local/lib/python2.7/dist-packages/supervisor/supervisord.py", line 376, in go
    d.main()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/supervisord.py", line 83, in main
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/supervisord.py", line 100, in run
    self.runforever()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/supervisord.py", line 254, in runforever
    [ group.transition() for group  in pgroups ]
  File "/usr/local/lib/python2.7/dist-packages/supervisor/process.py", line 706, in transition
    proc.transition()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/process.py", line 550, in transition
    self.spawn()
  File "/usr/local/lib/python2.7/dist-packages/supervisor/process.py", line 219, in spawn
    self.dispatchers, self.pipes = self.config.make_dispatchers(self)
  File "/usr/local/lib/python2.7/dist-packages/supervisor/options.py", line 1690, in make_dispatchers
    dispatchers[stdout_fd] = POutputDispatcher(proc, etype, stdout_fd)
  File "/usr/local/lib/python2.7/dist-packages/supervisor/dispatchers.py", line 98, in __init__
    backups=backups)
  File "/usr/local/lib/python2.7/dist-packages/supervisor/options.py", line 452, in getLogger
    backups, stdout)
  File "/usr/local/lib/python2.7/dist-packages/supervisor/loggers.py", line 344, in getLogger
    handlers.append(FileHandler(filename))
  File "/usr/local/lib/python2.7/dist-packages/supervisor/loggers.py", line 98, in __init__
    self.stream = open(filename, mode)
IOError: [Errno 13] Permission denied: '/dev/stdout'

If I should rebase commits into one commit, please tell me that.

arikfr added a commit that referenced this pull request Jan 6, 2016
Build dependencies during building Docker image
@arikfr arikfr merged commit 55f8069 into getredash:master Jan 6, 2016
@arikfr
Copy link
Member

arikfr commented Jan 6, 2016

Merged. Thanks 👍
Sorry it took so long.

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

Successfully merging this pull request may close these issues.

None yet

2 participants