diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2017-07-29 16:17:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-29 16:17:09 +0200 |
commit | fccfa09df84011f363311c44fa1b374ba7cd9af8 (patch) | |
tree | a5f9a26ce2033182fd0d13c9035b44ff9ebbf9fe /doc/md/docker/docker-101.md | |
parent | 57ee53d6c6be4b641764b0a635b2998c6cdc8197 (diff) | |
parent | 3a6f91a9ccbdd8f2ed8e33c88c7800f2623cfd3a (diff) | |
download | Shaarli-fccfa09df84011f363311c44fa1b374ba7cd9af8.tar.gz Shaarli-fccfa09df84011f363311c44fa1b374ba7cd9af8.tar.zst Shaarli-fccfa09df84011f363311c44fa1b374ba7cd9af8.zip |
Merge pull request #906 from virtualtam/docker/cleanup
docker: remove `dev` image, update documentation
Diffstat (limited to 'doc/md/docker/docker-101.md')
-rw-r--r-- | doc/md/docker/docker-101.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md new file mode 100644 index 00000000..b02dd149 --- /dev/null +++ b/doc/md/docker/docker-101.md | |||
@@ -0,0 +1,62 @@ | |||
1 | ## Basics | ||
2 | Install [Docker](https://www.docker.com/), by following the instructions relevant | ||
3 | to your OS / distribution, and start the service. | ||
4 | |||
5 | ### Search an image on [DockerHub](https://hub.docker.com/) | ||
6 | |||
7 | ```bash | ||
8 | $ docker search debian | ||
9 | |||
10 | NAME DESCRIPTION STARS OFFICIAL AUTOMATED | ||
11 | ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK] | ||
12 | debian Debian is a Linux distribution that's comp... 603 [OK] | ||
13 | google/debian 47 [OK] | ||
14 | ``` | ||
15 | |||
16 | ### Show available tags for a repository | ||
17 | ```bash | ||
18 | $ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool | ||
19 | |||
20 | % Total % Received % Xferd Average Speed Time Time Time Current | ||
21 | Dload Upload Total Spent Left Speed | ||
22 | 100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433 | ||
23 | ``` | ||
24 | |||
25 | Sample output: | ||
26 | ```json | ||
27 | [ | ||
28 | { | ||
29 | "layer": "85a02782", | ||
30 | "name": "stretch" | ||
31 | }, | ||
32 | { | ||
33 | "layer": "59abecbc", | ||
34 | "name": "testing" | ||
35 | }, | ||
36 | { | ||
37 | "layer": "bf0fd686", | ||
38 | "name": "unstable" | ||
39 | }, | ||
40 | { | ||
41 | "layer": "60c52dbe", | ||
42 | "name": "wheezy" | ||
43 | }, | ||
44 | { | ||
45 | "layer": "c5b806fe", | ||
46 | "name": "wheezy-backports" | ||
47 | } | ||
48 | ] | ||
49 | |||
50 | ``` | ||
51 | |||
52 | ### Pull an image from DockerHub | ||
53 | ```bash | ||
54 | $ docker pull repository[:tag] | ||
55 | |||
56 | $ docker pull debian:wheezy | ||
57 | wheezy: Pulling from debian | ||
58 | 4c8cbfd2973e: Pull complete | ||
59 | 60c52dbe9d91: Pull complete | ||
60 | Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe | ||
61 | Status: Downloaded newer image for debian:wheezy | ||
62 | ``` | ||