Commit bf27953 1 parent ad5bb07 commit bf27953 Copy full SHA for bf27953
File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,13 @@ $> marina-pull piscineri3/go-base:latest
25
25
Loaded image: piscineri3/go-base:latest
26
26
2016/09/19 16:22:13 pulling " piscineri3/go-base" ... [done] (16.304998995s)
27
27
```
28
+
29
+ Note that by default ` marina-pull ` will try to pull from ` piscine.in2p3.fr ` .
30
+ You may change this behaviour by passing ` -addr=example.com ` or ` -addr=192.168.0.2 ` as an argument:
31
+
32
+ ``` sh
33
+ $> marina-pull -addr=19.168.0.2 piscineri3/go-base
34
+ 2016/09/20 12:41:10 pulling " piscineri3/go-base" ...
35
+ Loaded image: piscineri3/go-base:latest
36
+ 2016/09/20 12:41:26 pulling " piscineri3/go-base" ... [done] (16.304998995s)
37
+ ```
Original file line number Diff line number Diff line change 5
5
package main
6
6
7
7
import (
8
+ "flag"
8
9
"io"
9
10
"log"
10
11
"net/http"
@@ -18,15 +19,18 @@ func main() {
18
19
}
19
20
20
21
func run () {
21
- name := os .Args [1 ]
22
+ addr := flag .String ("addr" , "piscine.in2p3.fr" , "address of the marina" )
23
+ flag .Parse ()
24
+
25
+ name := flag .Arg (0 )
22
26
23
27
start := time .Now ()
24
28
defer func () {
25
29
log .Printf ("pulling %q... [done] (%v)" , name , time .Since (start ))
26
30
}()
27
31
log .Printf ("pulling %q...\n " , name )
28
32
29
- resp , err := http .Get ("http://piscine.in2p3.fr :8080/docker-images/" + name )
33
+ resp , err := http .Get ("http://" + * addr + " :8080/docker-images/" + name )
30
34
if err != nil {
31
35
log .Fatalf ("marina-get %q: %v\n " , name , err )
32
36
}
You can’t perform that action at this time.
0 commit comments