Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit af98137

Browse files
author
Alexey Simakov
committed
Add readme
1 parent e151f60 commit af98137

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Usage
2+
3+
How to use `rubyc` tool in docker?
4+
https://github.com/pmq20/ruby-packer
5+
6+
### Install docker tool:
7+
8+
https://docs.docker.com/v17.12/install/
9+
10+
Straight link for Ubuntu install:
11+
12+
https://docs.docker.com/v17.12/install/linux/docker-ce/ubuntu/
13+
14+
### Clone it
15+
16+
`git clone git@github.com:iamsimakov/rubyc-usage-example.git`
17+
18+
### Build
19+
20+
`cd rubyc-usage-example && docker build ./`
21+
22+
... will take ~10 mins and near 10GB memory usage
23+
24+
Sample output will finished with lines:
25+
26+
<pre>
27+
...
28+
linking ruby
29+
make[2]: Leaving directory '/tmp/rubyc/ruby-2.4.1-0.4.0'
30+
make[1]: Leaving directory '/tmp/rubyc/ruby-2.4.1-0.4.0'
31+
-> cp "ruby" "/usr/src/app/a.out"
32+
-> cd /usr/src/app
33+
Removing intermediate container e9fba5750acd
34+
---> 200de23ba865
35+
Successfully built 200de23ba865
36+
</pre>
37+
38+
### Run app
39+
40+
`docker run -it 200de23ba865 bash`
41+
`./a.out`
42+
or
43+
`docker run -it 200de23ba865 ./a.out`
44+
45+
Sample output:
46+
<pre>
47+
### Search for nodes by css
48+
### Search for nodes by xpath
49+
### Or mix and match.
50+
</pre>
51+
52+
# Recomendations for Rails Apps
53+
54+
Modify Dockerfile as you want to build yor app.
55+
For example, to build rails change last line to
56+
57+
`RUN rubyc bin/rails`
58+
59+
More info read: https://github.com/pmq20/ruby-packer
60+
61+
Based on: https://github.com/pmq20/ruby-packer/issues/39#issuecomment-415494119
62+

0 commit comments

Comments
 (0)