trusted-sandbox 0.0.4.pre → 0.0.5.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9af2320f694b6680f7d379fb627accbea8838bdc
4
- data.tar.gz: 668cac12d319ac12790444efdfc15633c294469f
3
+ metadata.gz: 0d3fb95fffeffce711e562faff1deef7cff15718
4
+ data.tar.gz: 3a5958b483d1df9fe5c840ac259e16ba1a3d83e9
5
5
  SHA512:
6
- metadata.gz: 0ac29dbd2e3fef1ede1b0f3a8be19bf855563c225b13d74b92a8359746b65a13e03c020c5f8c981b82f0901ba1d8805f46cf31d16a8712cd6068877097d84b6b
7
- data.tar.gz: 68bf05f6e4108d6d467a2e1d36b15bf0eb24f8cd26379161bea4e04050d57f9ab4c350907fd2f891c98df07f3c69ef006e0a311d51009e77126999ea4afba9bb
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
- Then, run the following command which will copy the `trusted_sandbox.yml` file into your current directory, or
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
- ### Step 2
63
- Install Docker. Refer to the Docker documentation to see how to install Docker on your environment.
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 3
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 4
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 1 above.
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
@@ -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'
@@ -1,3 +1,3 @@
1
1
  module TrustedSandbox
2
- VERSION = '0.0.4.pre'
2
+ VERSION = '0.0.5.pre'
3
3
  end
@@ -11,6 +11,11 @@ module TrustedSandbox
11
11
  require 'trusted_sandbox/uid_pool'
12
12
  require 'trusted_sandbox/version'
13
13
 
14
+ def self.test
15
+ Docker.version
16
+ true
17
+ end
18
+
14
19
  # Usage:
15
20
  # TrustedSandbox.config do |c|
16
21
  # c.pool_size = 10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusted-sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre
4
+ version: 0.0.5.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amit Aharoni