trusted-sandbox 0.0.4.pre → 0.0.5.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -6
- data/lib/trusted_sandbox/cli.rb +6 -0
- data/lib/trusted_sandbox/version.rb +1 -1
- data/lib/trusted_sandbox.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d3fb95fffeffce711e562faff1deef7cff15718
|
4
|
+
data.tar.gz: 3a5958b483d1df9fe5c840ac259e16ba1a3d83e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7e5a87ed6c9f9574c649ae197feefd9f7a888c3f6121c61b22c0b9d7121227727b31dc3c6327d236727706aef6d81f80c34a591dd748dfd96fd60643e915cca
|
7
|
+
data.tar.gz: b95fa38e9eb1d868d9637591d468c77d8b886e7040536bcaf84e5a5806779cbeabea8f7d0a573a9fd40a51aca43ef7d3d6bb4cdb11336290b052afd29e279f08
|
data/README.md
CHANGED
@@ -53,16 +53,35 @@ Or install it yourself as:
|
|
53
53
|
$ gem install trusted-sandbox
|
54
54
|
```
|
55
55
|
|
56
|
-
|
56
|
+
### Step 2
|
57
|
+
Install Docker. Refer to the Docker documentation to see how to install Docker on your environment.
|
58
|
+
Note that on a linux server the docker daemon runs as root and owns the socket used to connect to it.
|
59
|
+
To give your app user access to that socket you will need to add the user to the docker group.
|
60
|
+
```
|
61
|
+
$ sudo gpasswd -a ${USER} docker
|
62
|
+
$ sudo service docker.io restart
|
63
|
+
```
|
64
|
+
then reconnect to your shell session and try the following (without sudo command):
|
65
|
+
```
|
66
|
+
$ docker images
|
67
|
+
```
|
68
|
+
If it works, then you are all set.
|
69
|
+
|
70
|
+
You can read more about this issue [here][5].
|
71
|
+
|
72
|
+
### Step 3
|
73
|
+
Run the following command which will copy the `trusted_sandbox.yml` file into your current directory, or
|
57
74
|
`config` directory if it exists:
|
58
75
|
```
|
59
76
|
$ trusted_sandbox install
|
60
77
|
```
|
61
78
|
|
62
|
-
|
63
|
-
|
79
|
+
Follow the configuration instructions below. Once you're done configuring, test your installation by running:
|
80
|
+
```
|
81
|
+
$ trusted_sandbox test
|
82
|
+
```
|
64
83
|
|
65
|
-
### Step
|
84
|
+
### Step 4
|
66
85
|
Install the image. This step is optional, as Docker automatically installs images when you first run them. However,
|
67
86
|
since it takes a few minutes we suggest you do this in advance.
|
68
87
|
```
|
@@ -77,14 +96,14 @@ $ sudo service docker.io restart
|
|
77
96
|
```
|
78
97
|
and then try again.
|
79
98
|
|
80
|
-
### Step
|
99
|
+
### Step 5
|
81
100
|
|
82
101
|
If you'd like to limit swap memory or set user quotas you'll have to install additional programs on your server.
|
83
102
|
Follow the instructions in the relevant sections of the configuration guide.
|
84
103
|
|
85
104
|
## Configuring Trusted Sandbox
|
86
105
|
|
87
|
-
Let's go over the sections of the YAML configuration file you created in step
|
106
|
+
Let's go over the sections of the YAML configuration file you created in step 3 above.
|
88
107
|
|
89
108
|
### Docker access
|
90
109
|
```ruby
|
@@ -398,3 +417,4 @@ Licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
|
398
417
|
[2]: https://www.digitalocean.com/community/articles/how-to-enable-user-quotas
|
399
418
|
[3]: http://hmarr.com/2013/oct/16/codecube-runnable-gists/
|
400
419
|
[4]: https://www.digitalocean.com/community/tutorials/how-to-enable-user-quotas
|
420
|
+
[5]: http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
|
data/lib/trusted_sandbox/cli.rb
CHANGED
@@ -16,6 +16,12 @@ module TrustedSandbox
|
|
16
16
|
FileUtils.cp File.expand_path('../config/trusted_sandbox.yml', __FILE__), target_file
|
17
17
|
end
|
18
18
|
|
19
|
+
desc 'test', 'Checks Trusted Sandbox can connect to Docker'
|
20
|
+
def test
|
21
|
+
TrustedSandbox.test
|
22
|
+
puts 'Trusted Sandbox seems to be configured correctly!'
|
23
|
+
end
|
24
|
+
|
19
25
|
desc 'generate_image VERSION', 'Creates the Docker image files and places them into the `trusted_sandbox_images` directory. Default version is 2.1.2'
|
20
26
|
def generate_image(image_version = '2.1.2')
|
21
27
|
target_dir = 'trusted_sandbox_images'
|
data/lib/trusted_sandbox.rb
CHANGED