Last active
January 11, 2017 16:18
-
-
Save werkshy/11387849 to your computer and use it in GitHub Desktop.
Heroku plugin that installs busybox onto a dynos before dropping you into a bash shell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Put this file at ~/.heroku/plugins/busybox/init.rb | |
# Call it with 'heroku busybox' | |
require 'heroku/helpers' | |
require 'heroku/command' | |
require 'heroku/command/run' | |
class Heroku::Command::Busybox < Heroku::Command::Run | |
# Run bash on heroku with busybox | |
# | |
def index | |
run_attached(busybox_cmd) | |
end | |
protected | |
def busybox_cmd | |
<<-CMD | |
mkdir busybox | |
curl http://busybox.net/downloads/binaries/latest/busybox-x86_64 --location --silent > busybox/busybox | |
chmod a+x busybox/busybox | |
export PATH=$PATH:/app/busybox | |
busybox --install -s busybox | |
bash | |
CMD | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New URL: https://busybox.net/downloads/binaries/1.26.2-i686/busybox