· 6 years ago · Mar 28, 2019, 11:28 AM
1debian@server-1:~$ sudo su
2root@server-1:/home/debian# apt update && apt upgrade -y
3Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
4Get:2 http://security.debian.org stretch/updates/non-free Sources [1,216 B]
5Get:3 http://security.debian.org stretch/updates/contrib Sources [1,384 B]
6Get:4 http://security.debian.org stretch/updates/main Sources [197 kB]
7Ign:5 http://deb.debian.org/debian stretch InRelease
8Get:6 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
9Get:7 http://security.debian.org stretch/updates/main amd64 Packages [481 kB]
10Get:8 http://deb.debian.org/debian stretch Release [118 kB]
11Get:9 http://security.debian.org stretch/updates/main Translation-en [213 kB]
12Get:10 http://deb.debian.org/debian stretch Release.gpg [2,434 B]
13Get:11 http://security.debian.org stretch/updates/contrib amd64 Packages [1,760 B]
14Get:12 http://security.debian.org stretch/updates/contrib Translation-en [1,759 B]
15Get:13 http://security.debian.org stretch/updates/non-free amd64 Packages [1,600 B]
16Get:14 http://security.debian.org stretch/updates/non-free Translation-en [691 B]
17Get:15 http://deb.debian.org/debian stretch-updates/main Sources [14.3 kB]
18Get:16 http://deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
19Get:17 http://deb.debian.org/debian stretch-updates/main Translation-en [11.1 kB]
20Get:18 http://deb.debian.org/debian stretch/main Sources [6,746 kB]
21Get:19 http://deb.debian.org/debian stretch/non-free Sources [79.4 kB]
22Get:20 http://deb.debian.org/debian stretch/contrib Sources [44.7 kB]
23Get:21 http://deb.debian.org/debian stretch/main amd64 Packages [7,084 kB]
24Get:22 http://deb.debian.org/debian stretch/main Translation-en [5,384 kB]
25Get:23 http://deb.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
26Get:24 http://deb.debian.org/debian stretch/contrib Translation-en [45.9 kB]
27Get:25 http://deb.debian.org/debian stretch/non-free amd64 Packages [78.3 kB]
28Get:26 http://deb.debian.org/debian stretch/non-free Translation-en [80.3 kB]
29Fetched 20.8 MB in 6s (3,212 kB/s)
30Reading package lists... Done
31Building dependency tree
32Reading state information... Done
334 packages can be upgraded. Run 'apt list --upgradable' to see them.
34Reading package lists... Done
35Building dependency tree
36Reading state information... Done
37Calculating upgrade... Done
38The following packages will be upgraded:
39 libssl1.0.2 openssh-client openssh-server openssh-sftp-server
404 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
41Need to get 2,455 kB of archives.
42After this operation, 4,096 B of additional disk space will be used.
43Get:1 http://security.debian.org stretch/updates/main amd64 libssl1.0.2 amd64 1.0.2r-1~deb9u1 [1,302 kB]
44Get:2 http://security.debian.org stretch/updates/main amd64 openssh-sftp-server amd64 1:7.4p1-10+deb9u6 [39.7 kB]
45Get:3 http://security.debian.org stretch/updates/main amd64 openssh-server amd64 1:7.4p1-10+deb9u6 [332 kB]
46Get:4 http://security.debian.org stretch/updates/main amd64 openssh-client amd64 1:7.4p1-10+deb9u6 [781 kB]
47Fetched 2,455 kB in 0s (8,773 kB/s)
48Preconfiguring packages ...
49(Reading database ... 27113 files and directories currently installed.)
50Preparing to unpack .../libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb ...
51Unpacking libssl1.0.2:amd64 (1.0.2r-1~deb9u1) over (1.0.2q-1~deb9u1) ...
52Preparing to unpack .../openssh-sftp-server_1%3a7.4p1-10+deb9u6_amd64.deb ...
53Unpacking openssh-sftp-server (1:7.4p1-10+deb9u6) over (1:7.4p1-10+deb9u5) ...
54Preparing to unpack .../openssh-server_1%3a7.4p1-10+deb9u6_amd64.deb ...
55Unpacking openssh-server (1:7.4p1-10+deb9u6) over (1:7.4p1-10+deb9u5) ...
56Preparing to unpack .../openssh-client_1%3a7.4p1-10+deb9u6_amd64.deb ...
57Unpacking openssh-client (1:7.4p1-10+deb9u6) over (1:7.4p1-10+deb9u5) ...
58Setting up libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ...
59Processing triggers for libc-bin (2.24-11+deb9u4) ...
60Processing triggers for systemd (232-25+deb9u9) ...
61Processing triggers for man-db (2.7.6.1-2) ...
62Setting up openssh-client (1:7.4p1-10+deb9u6) ...
63Setting up openssh-sftp-server (1:7.4p1-10+deb9u6) ...
64Setting up openssh-server (1:7.4p1-10+deb9u6) ...
65root@server-1:/home/debian# apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
66Reading package lists... Done
67Building dependency tree
68Reading state information... Done
69ca-certificates is already the newest version (20161130+nmu1+deb9u1).
70ca-certificates set to manually installed.
71The following additional packages will be installed:
72 gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 iso-codes libcurl3 libcurl3-gnutls libdbus-glib-1-2 libgirepository-1.0-1 libldap-2.4-2 libldap-common libnghttp2-14 libpackagekit-glib2-18 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1
73 python-apt-common python3-apt python3-dbus python3-gi python3-pycurl python3-software-properties
74Suggested packages:
75 isoquery python3-apt-dbg python-apt-doc python-dbus-doc python3-dbus-dbg libcurl4-gnutls-dev python-pycurl-doc python3-pycurl-dbg
76Recommended packages:
77 packagekit libsasl2-modules unattended-upgrades
78The following NEW packages will be installed:
79 apt-transport-https curl gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 gnupg2 iso-codes libcurl3 libcurl3-gnutls libdbus-glib-1-2 libgirepository-1.0-1 libldap-2.4-2 libldap-common libnghttp2-14 libpackagekit-glib2-18 librtmp1 libsasl2-2
80 libsasl2-modules-db libssh2-1 python-apt-common python3-apt python3-dbus python3-gi python3-pycurl python3-software-properties software-properties-common
810 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
82Need to get 6,121 kB of archives.
83After this operation, 26.9 MB of additional disk space will be used.
84Do you want to continue? [Y/n] y
85Get:1 http://deb.debian.org/debian stretch/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3 [68.2 kB]
86Get:2 http://deb.debian.org/debian stretch/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3 [105 kB]
87Get:3 http://deb.debian.org/debian stretch/main amd64 libldap-common all 2.4.44+dfsg-5+deb9u2 [85.5 kB]
88Get:4 http://deb.debian.org/debian stretch/main amd64 libldap-2.4-2 amd64 2.4.44+dfsg-5+deb9u2 [219 kB]
89Get:5 http://deb.debian.org/debian stretch/main amd64 libnghttp2-14 amd64 1.18.1-1 [79.1 kB]
90Get:6 http://deb.debian.org/debian stretch/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1+b1 [60.4 kB]
91Get:7 http://deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1 [138 kB]
92Get:8 http://deb.debian.org/debian stretch/main amd64 libcurl3-gnutls amd64 7.52.1-5+deb9u9 [290 kB]
93Get:9 http://deb.debian.org/debian stretch/main amd64 apt-transport-https amd64 1.4.9 [171 kB]
94Get:10 http://deb.debian.org/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u9 [292 kB]
95Get:11 http://deb.debian.org/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u9 [227 kB]
96Get:12 http://deb.debian.org/debian stretch/main amd64 libgirepository-1.0-1 amd64 1.50.0-1+b1 [89.0 kB]
97Get:13 http://deb.debian.org/debian stretch/main amd64 gir1.2-glib-2.0 amd64 1.50.0-1+b1 [139 kB]
98Get:14 http://deb.debian.org/debian stretch/main amd64 libpackagekit-glib2-18 amd64 1.1.5-2+deb9u1 [114 kB]
99Get:15 http://deb.debian.org/debian stretch/main amd64 gir1.2-packagekitglib-1.0 amd64 1.1.5-2+deb9u1 [34.7 kB]
100Get:16 http://deb.debian.org/debian stretch/main amd64 gnupg2 all 2.1.18-8~deb9u4 [299 kB]
101Get:17 http://deb.debian.org/debian stretch/main amd64 iso-codes all 3.75-1 [2,389 kB]
102Get:18 http://deb.debian.org/debian stretch/main amd64 libdbus-glib-1-2 amd64 0.108-2 [206 kB]
103Get:19 http://deb.debian.org/debian stretch/main amd64 python-apt-common all 1.4.0~beta3 [93.0 kB]
104Get:20 http://deb.debian.org/debian stretch/main amd64 python3-apt amd64 1.4.0~beta3 [170 kB]
105Get:21 http://deb.debian.org/debian stretch/main amd64 python3-dbus amd64 1.2.4-1+b1 [184 kB]
106Get:22 http://deb.debian.org/debian stretch/main amd64 python3-gi amd64 3.22.0-2 [473 kB]
107Get:23 http://deb.debian.org/debian stretch/main amd64 python3-pycurl amd64 7.43.0-2 [61.3 kB]
108Get:24 http://deb.debian.org/debian stretch/main amd64 python3-software-properties all 0.96.20.2-1 [49.5 kB]
109Get:25 http://deb.debian.org/debian stretch/main amd64 software-properties-common all 0.96.20.2-1 [83.6 kB]
110Fetched 6,121 kB in 0s (7,650 kB/s)
111Selecting previously unselected package libsasl2-modules-db:amd64.
112(Reading database ... 27113 files and directories currently installed.)
113Preparing to unpack .../00-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
114Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
115Selecting previously unselected package libsasl2-2:amd64.
116Preparing to unpack .../01-libsasl2-2_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
117Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
118Selecting previously unselected package libldap-common.
119Preparing to unpack .../02-libldap-common_2.4.44+dfsg-5+deb9u2_all.deb ...
120Unpacking libldap-common (2.4.44+dfsg-5+deb9u2) ...
121Selecting previously unselected package libldap-2.4-2:amd64.
122Preparing to unpack .../03-libldap-2.4-2_2.4.44+dfsg-5+deb9u2_amd64.deb ...
123Unpacking libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
124Selecting previously unselected package libnghttp2-14:amd64.
125Preparing to unpack .../04-libnghttp2-14_1.18.1-1_amd64.deb ...
126Unpacking libnghttp2-14:amd64 (1.18.1-1) ...
127Selecting previously unselected package librtmp1:amd64.
128Preparing to unpack .../05-librtmp1_2.4+20151223.gitfa8646d.1-1+b1_amd64.deb ...
129Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
130Selecting previously unselected package libssh2-1:amd64.
131Preparing to unpack .../06-libssh2-1_1.7.0-1_amd64.deb ...
132Unpacking libssh2-1:amd64 (1.7.0-1) ...
133Selecting previously unselected package libcurl3-gnutls:amd64.
134Preparing to unpack .../07-libcurl3-gnutls_7.52.1-5+deb9u9_amd64.deb ...
135Unpacking libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) ...
136Selecting previously unselected package apt-transport-https.
137Preparing to unpack .../08-apt-transport-https_1.4.9_amd64.deb ...
138Unpacking apt-transport-https (1.4.9) ...
139Selecting previously unselected package libcurl3:amd64.
140Preparing to unpack .../09-libcurl3_7.52.1-5+deb9u9_amd64.deb ...
141Unpacking libcurl3:amd64 (7.52.1-5+deb9u9) ...
142Selecting previously unselected package curl.
143Preparing to unpack .../10-curl_7.52.1-5+deb9u9_amd64.deb ...
144Unpacking curl (7.52.1-5+deb9u9) ...
145Selecting previously unselected package libgirepository-1.0-1:amd64.
146Preparing to unpack .../11-libgirepository-1.0-1_1.50.0-1+b1_amd64.deb ...
147Unpacking libgirepository-1.0-1:amd64 (1.50.0-1+b1) ...
148Selecting previously unselected package gir1.2-glib-2.0:amd64.
149Preparing to unpack .../12-gir1.2-glib-2.0_1.50.0-1+b1_amd64.deb ...
150Unpacking gir1.2-glib-2.0:amd64 (1.50.0-1+b1) ...
151Selecting previously unselected package libpackagekit-glib2-18:amd64.
152Preparing to unpack .../13-libpackagekit-glib2-18_1.1.5-2+deb9u1_amd64.deb ...
153Unpacking libpackagekit-glib2-18:amd64 (1.1.5-2+deb9u1) ...
154Selecting previously unselected package gir1.2-packagekitglib-1.0.
155Preparing to unpack .../14-gir1.2-packagekitglib-1.0_1.1.5-2+deb9u1_amd64.deb ...
156Unpacking gir1.2-packagekitglib-1.0 (1.1.5-2+deb9u1) ...
157Selecting previously unselected package gnupg2.
158Preparing to unpack .../15-gnupg2_2.1.18-8~deb9u4_all.deb ...
159Unpacking gnupg2 (2.1.18-8~deb9u4) ...
160Selecting previously unselected package iso-codes.
161Preparing to unpack .../16-iso-codes_3.75-1_all.deb ...
162Unpacking iso-codes (3.75-1) ...
163Selecting previously unselected package libdbus-glib-1-2:amd64.
164Preparing to unpack .../17-libdbus-glib-1-2_0.108-2_amd64.deb ...
165Unpacking libdbus-glib-1-2:amd64 (0.108-2) ...
166Selecting previously unselected package python-apt-common.
167Preparing to unpack .../18-python-apt-common_1.4.0~beta3_all.deb ...
168Unpacking python-apt-common (1.4.0~beta3) ...
169Selecting previously unselected package python3-apt.
170Preparing to unpack .../19-python3-apt_1.4.0~beta3_amd64.deb ...
171Unpacking python3-apt (1.4.0~beta3) ...
172Selecting previously unselected package python3-dbus.
173Preparing to unpack .../20-python3-dbus_1.2.4-1+b1_amd64.deb ...
174Unpacking python3-dbus (1.2.4-1+b1) ...
175Selecting previously unselected package python3-gi.
176Preparing to unpack .../21-python3-gi_3.22.0-2_amd64.deb ...
177Unpacking python3-gi (3.22.0-2) ...
178Selecting previously unselected package python3-pycurl.
179Preparing to unpack .../22-python3-pycurl_7.43.0-2_amd64.deb ...
180Unpacking python3-pycurl (7.43.0-2) ...
181Selecting previously unselected package python3-software-properties.
182Preparing to unpack .../23-python3-software-properties_0.96.20.2-1_all.deb ...
183Unpacking python3-software-properties (0.96.20.2-1) ...
184Selecting previously unselected package software-properties-common.
185Preparing to unpack .../24-software-properties-common_0.96.20.2-1_all.deb ...
186Unpacking software-properties-common (0.96.20.2-1) ...
187Setting up python-apt-common (1.4.0~beta3) ...
188Setting up python3-apt (1.4.0~beta3) ...
189Setting up libnghttp2-14:amd64 (1.18.1-1) ...
190Setting up iso-codes (3.75-1) ...
191Setting up libldap-common (2.4.44+dfsg-5+deb9u2) ...
192Setting up libdbus-glib-1-2:amd64 (0.108-2) ...
193Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
194Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
195Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
196Setting up libpackagekit-glib2-18:amd64 (1.1.5-2+deb9u1) ...
197Setting up libgirepository-1.0-1:amd64 (1.50.0-1+b1) ...
198Setting up gnupg2 (2.1.18-8~deb9u4) ...
199Setting up gir1.2-glib-2.0:amd64 (1.50.0-1+b1) ...
200Setting up libssh2-1:amd64 (1.7.0-1) ...
201Processing triggers for libc-bin (2.24-11+deb9u4) ...
202Setting up libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
203Processing triggers for man-db (2.7.6.1-2) ...
204Setting up gir1.2-packagekitglib-1.0 (1.1.5-2+deb9u1) ...
205Processing triggers for dbus (1.10.26-0+deb9u1) ...
206Setting up python3-dbus (1.2.4-1+b1) ...
207Setting up libcurl3:amd64 (7.52.1-5+deb9u9) ...
208Setting up libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) ...
209Setting up python3-gi (3.22.0-2) ...
210Setting up python3-pycurl (7.43.0-2) ...
211Setting up apt-transport-https (1.4.9) ...
212Setting up curl (7.52.1-5+deb9u9) ...
213Setting up python3-software-properties (0.96.20.2-1) ...
214Setting up software-properties-common (0.96.20.2-1) ...
215Processing triggers for libc-bin (2.24-11+deb9u4) ...
216Processing triggers for dbus (1.10.26-0+deb9u1) ...
217root@server-1:/home/debian# curl -fsSL https://get.docker.com/ | sh
218# Executing docker install script, commit: cfba462
219+ sh -c apt-get update -qq >/dev/null
220+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
221+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
222Warning: apt-key output should not be parsed (stdout is not a terminal)
223+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" > /etc/apt/sources.list.d/docker.list
224+ sh -c apt-get update -qq >/dev/null
225+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
226+ sh -c docker version
227Client:
228 Version: 18.09.4
229 API version: 1.39
230 Go version: go1.10.8
231 Git commit: d14af54
232 Built: Wed Mar 27 18:36:06 2019
233 OS/Arch: linux/amd64
234 Experimental: false
235
236Server: Docker Engine - Community
237 Engine:
238 Version: 18.09.4
239 API version: 1.39 (minimum version 1.12)
240 Go version: go1.10.8
241 Git commit: d14af54
242 Built: Wed Mar 27 18:01:48 2019
243 OS/Arch: linux/amd64
244 Experimental: false
245If you would like to use Docker as a non-root user, you should now consider
246adding your user to the "docker" group with something like:
247
248 sudo usermod -aG docker your-user
249
250Remember that you will have to log out and back in for this to take effect!
251
252WARNING: Adding a user to the "docker" group will grant the ability to run
253 containers which can be used to obtain root privileges on the
254 docker host.
255 Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
256 for more information.
257
258** DOCKER ENGINE - ENTERPRISE **
259
260If you’re ready for production workloads, Docker Engine - Enterprise also includes:
261
262 * SLA-backed technical support
263 * Extended lifecycle maintenance policy for patches and hotfixes
264 * Access to certified ecosystem content
265
266** Learn more at https://dockr.ly/engine2 **
267
268ACTIVATE your own engine to Docker Engine - Enterprise using:
269
270 sudo docker engine activate
271
272root@server-1:/home/debian# docker
273
274Usage: docker [OPTIONS] COMMAND
275
276A self-sufficient runtime for containers
277
278Options:
279 --config string Location of client config files (default "/root/.docker")
280 -D, --debug Enable debug mode
281 -H, --host list Daemon socket(s) to connect to
282 -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
283 --tls Use TLS; implied by --tlsverify
284 --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
285 --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
286 --tlskey string Path to TLS key file (default "/root/.docker/key.pem")
287 --tlsverify Use TLS and verify the remote
288 -v, --version Print version information and quit
289
290Management Commands:
291 builder Manage builds
292 config Manage Docker configs
293 container Manage containers
294 engine Manage the docker engine
295 image Manage images
296 network Manage networks
297 node Manage Swarm nodes
298 plugin Manage plugins
299 secret Manage Docker secrets
300 service Manage services
301 stack Manage Docker stacks
302 swarm Manage Swarm
303 system Manage Docker
304 trust Manage trust on Docker images
305 volume Manage volumes
306
307Commands:
308 attach Attach local standard input, output, and error streams to a running container
309 build Build an image from a Dockerfile
310 commit Create a new image from a container's changes
311 cp Copy files/folders between a container and the local filesystem
312 create Create a new container
313 diff Inspect changes to files or directories on a container's filesystem
314 events Get real time events from the server
315 exec Run a command in a running container
316 export Export a container's filesystem as a tar archive
317 history Show the history of an image
318 images List images
319 import Import the contents from a tarball to create a filesystem image
320 info Display system-wide information
321 inspect Return low-level information on Docker objects
322 kill Kill one or more running containers
323 load Load an image from a tar archive or STDIN
324 login Log in to a Docker registry
325 logout Log out from a Docker registry
326 logs Fetch the logs of a container
327 pause Pause all processes within one or more containers
328 port List port mappings or a specific mapping for the container
329 ps List containers
330 pull Pull an image or a repository from a registry
331 push Push an image or a repository to a registry
332 rename Rename a container
333 restart Restart one or more containers
334 rm Remove one or more containers
335 rmi Remove one or more images
336 run Run a command in a new container
337 save Save one or more images to a tar archive (streamed to STDOUT by default)
338 search Search the Docker Hub for images
339 start Start one or more stopped containers
340 stats Display a live stream of container(s) resource usage statistics
341 stop Stop one or more running containers
342 tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
343 top Display the running processes of a container
344 unpause Unpause all processes within one or more containers
345 update Update configuration of one or more containers
346 version Show the Docker version information
347 wait Block until one or more containers stop, then print their exit codes
348
349Run 'docker COMMAND --help' for more information on a command.
350root@server-1:/home/debian# docker container --help
351
352Usage: docker container COMMAND
353
354Manage containers
355
356Commands:
357 attach Attach local standard input, output, and error streams to a running container
358 commit Create a new image from a container's changes
359 cp Copy files/folders between a container and the local filesystem
360 create Create a new container
361 diff Inspect changes to files or directories on a container's filesystem
362 exec Run a command in a running container
363 export Export a container's filesystem as a tar archive
364 inspect Display detailed information on one or more containers
365 kill Kill one or more running containers
366 logs Fetch the logs of a container
367 ls List containers
368 pause Pause all processes within one or more containers
369 port List port mappings or a specific mapping for the container
370 prune Remove all stopped containers
371 rename Rename a container
372 restart Restart one or more containers
373 rm Remove one or more containers
374 run Run a command in a new container
375 start Start one or more stopped containers
376 stats Display a live stream of container(s) resource usage statistics
377 stop Stop one or more running containers
378 top Display the running processes of a container
379 unpause Unpause all processes within one or more containers
380 update Update configuration of one or more containers
381 wait Block until one or more containers stop, then print their exit codes
382
383Run 'docker container COMMAND --help' for more information on a command.
384root@server-1:/home/debian# docker --version
385Docker version 18.09.4, build d14af54
386root@server-1:/home/debian# docker version
387Client:
388 Version: 18.09.4
389 API version: 1.39
390 Go version: go1.10.8
391 Git commit: d14af54
392 Built: Wed Mar 27 18:36:06 2019
393 OS/Arch: linux/amd64
394 Experimental: false
395
396Server: Docker Engine - Community
397 Engine:
398 Version: 18.09.4
399 API version: 1.39 (minimum version 1.12)
400 Go version: go1.10.8
401 Git commit: d14af54
402 Built: Wed Mar 27 18:01:48 2019
403 OS/Arch: linux/amd64
404 Experimental: false
405root@server-1:/home/debian# docker info
406Containers: 0
407 Running: 0
408 Paused: 0
409 Stopped: 0
410Images: 0
411Server Version: 18.09.4
412Storage Driver: overlay2
413 Backing Filesystem: extfs
414 Supports d_type: true
415 Native Overlay Diff: true
416Logging Driver: json-file
417Cgroup Driver: cgroupfs
418Plugins:
419 Volume: local
420 Network: bridge host macvlan null overlay
421 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
422Swarm: inactive
423Runtimes: runc
424Default Runtime: runc
425Init Binary: docker-init
426containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
427runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
428init version: fec3683
429Security Options:
430 seccomp
431 Profile: default
432Kernel Version: 4.9.0-8-amd64
433Operating System: Debian GNU/Linux 9 (stretch)
434OSType: linux
435Architecture: x86_64
436CPUs: 1
437Total Memory: 1.911GiB
438Name: server-1
439ID: MCXE:TTTR:DR6U:AGDQ:4G24:WJ6W:LSCM:GPTP:JFL2:DKIM:URUW:HTIM
440Docker Root Dir: /var/lib/docker
441Debug Mode (client): false
442Debug Mode (server): false
443Registry: https://index.docker.io/v1/
444Labels:
445Experimental: false
446Insecure Registries:
447 127.0.0.0/8
448Live Restore Enabled: false
449Product License: Community Engine
450
451WARNING: No swap limit support
452root@server-1:/home/debian# docker images
453REPOSITORY TAG IMAGE ID CREATED SIZE
454root@server-1:/home/debian# docker search ubuntu
455NAME DESCRIPTION STARS OFFICIAL AUTOMATED
456ubuntu Ubuntu is a Debian-based Linux operating sys… 9345 [OK]
457dorowu/ubuntu-desktop-lxde-vnc Docker image to provide HTML5 VNC interface … 286 [OK]
458rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 209 [OK]
459consol/ubuntu-xfce-vnc Ubuntu container with "headless" VNC session… 167 [OK]
460ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 96 [OK]
461ubuntu-upstart Upstart is an event-based replacement for th… 96 [OK]
462neurodebian NeuroDebian provides neuroscience research s… 56 [OK]
4631and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 50 [OK]
464ubuntu-debootstrap debootstrap --variant=minbase --components=m… 40 [OK]
465nuagebec/ubuntu Simple always updated Ubuntu docker images w… 23 [OK]
466i386/ubuntu Ubuntu is a Debian-based Linux operating sys… 17
4671and1internet/ubuntu-16-apache-php-7.0 ubuntu-16-apache-php-7.0 13 [OK]
468ppc64le/ubuntu Ubuntu is a Debian-based Linux operating sys… 12
469eclipse/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, … 8 [OK]
470codenvy/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, … 5 [OK]
471darksheer/ubuntu Base Ubuntu Image -- Updated hourly 5 [OK]
472pivotaldata/ubuntu A quick freshening-up of the base Ubuntu doc… 2
4731and1internet/ubuntu-16-sshd ubuntu-16-sshd 1 [OK]
474smartentry/ubuntu ubuntu with smartentry 1 [OK]
4751and1internet/ubuntu-16-php-7.1 ubuntu-16-php-7.1 1 [OK]
476paasmule/bosh-tools-ubuntu Ubuntu based bosh-cli 1 [OK]
477pivotaldata/ubuntu-gpdb-dev Ubuntu images for GPDB development 0
4781and1internet/ubuntu-16-healthcheck ubuntu-16-healthcheck 0 [OK]
479ossobv/ubuntu Custom ubuntu image from scratch (based on o… 0
4801and1internet/ubuntu-16-rspec ubuntu-16-rspec 0 [OK]
481root@server-1:/home/debian# docker pull ubuntu
482Using default tag: latest
483latest: Pulling from library/ubuntu
484898c46f3b1a1: Pull complete
48563366dfa0a50: Pull complete
486041d4cd74a92: Pull complete
4876e1bee0f8701: Pull complete
488Digest: sha256:017eef0b616011647b269b5c65826e2e2ebddbe5d1f8c1e56b3599fb14fabec8
489Status: Downloaded newer image for ubuntu:latest
490root@server-1:/home/debian# docker images
491REPOSITORY TAG IMAGE ID CREATED SIZE
492ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
493root@server-1:/home/debian# docker run hello-world
494Unable to find image 'hello-world:latest' locally
495latest: Pulling from library/hello-world
4961b930d010525: Pull complete
497Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
498Status: Downloaded newer image for hello-world:latest
499
500Hello from Docker!
501This message shows that your installation appears to be working correctly.
502
503To generate this message, Docker took the following steps:
504 1. The Docker client contacted the Docker daemon.
505 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
506 (amd64)
507 3. The Docker daemon created a new container from that image which runs the
508 executable that produces the output you are currently reading.
509 4. The Docker daemon streamed that output to the Docker client, which sent it
510 to your terminal.
511
512To try something more ambitious, you can run an Ubuntu container with:
513 $ docker run -it ubuntu bash
514
515Share images, automate workflows, and more with a free Docker ID:
516 https://hub.docker.com/
517
518For more examples and ideas, visit:
519 https://docs.docker.com/get-started/
520
521root@server-1:/home/debian# docker run -it ubuntu bash
522root@446696402fbb:/# ls
523bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
524root@446696402fbb:/# ifconfig
525bash: ifconfig: command not found
526root@446696402fbb:/# mkdir testing
527root@446696402fbb:/# ls
528bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys testing tmp usr var
529root@446696402fbb:/# exit
530exit
531root@server-1:/home/debian# docker container run --detach --name mysqlSteven011 -e MYSQL_ROOT_PASSWORD=mysuperpassword mysql:latest
532Unable to find image 'mysql:latest' locally
533latest: Pulling from library/mysql
53427833a3ba0a5: Pull complete
535864c283b3c4b: Pull complete
536cea281b2278b: Pull complete
5378f856c14f5af: Pull complete
5389c4f38c23b6f: Pull complete
5391b810e1751b3: Pull complete
5405479aaef3d30: Pull complete
541ded8fa2e1614: Pull complete
542636033ba4d2e: Pull complete
543902e6010661d: Pull complete
544dbe44d2bf055: Pull complete
545e906385f419d: Pull complete
546Digest: sha256:a7cf659a764732a27963429a87eccc8457e6d4af0ee9d5140a3b56e74986eed7
547Status: Downloaded newer image for mysql:latest
548637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c
549root@server-1:/home/debian# docker container ls
550CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
551637a60cf6947 mysql:latest "docker-entrypoint.s…" About a minute ago Up About a minute 3306/tcp, 33060/tcp mysqlSteven011
552root@server-1:/home/debian# docker container ls
553CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
554637a60cf6947 mysql:latest "docker-entrypoint.s…" About a minute ago Up About a minute 3306/tcp, 33060/tcp mysqlSteven011
555root@server-1:/home/debian# docker images
556REPOSITORY TAG IMAGE ID CREATED SIZE
557mysql latest 7bb2586065cd 34 hours ago 477MB
558ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
559hello-world latest fce289e99eb9 2 months ago 1.84kB
560root@server-1:/home/debian# docker inspect mysqlSteven011
561[
562 {
563 "Id": "637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c",
564 "Created": "2019-03-28T09:55:37.03809023Z",
565 "Path": "docker-entrypoint.sh",
566 "Args": [
567 "mysqld"
568 ],
569 "State": {
570 "Status": "running",
571 "Running": true,
572 "Paused": false,
573 "Restarting": false,
574 "OOMKilled": false,
575 "Dead": false,
576 "Pid": 21992,
577 "ExitCode": 0,
578 "Error": "",
579 "StartedAt": "2019-03-28T09:55:37.581310242Z",
580 "FinishedAt": "0001-01-01T00:00:00Z"
581 },
582 "Image": "sha256:7bb2586065cd50457e315a5dab0732a87c45c5fad619c017732f5a13e58b51dd",
583 "ResolvConfPath": "/var/lib/docker/containers/637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c/resolv.conf",
584 "HostnamePath": "/var/lib/docker/containers/637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c/hostname",
585 "HostsPath": "/var/lib/docker/containers/637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c/hosts",
586 "LogPath": "/var/lib/docker/containers/637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c/637a60cf6947576ef7ad7219190e14a0a19af9c687d792e121592d67666e921c-json.log",
587 "Name": "/mysqlSteven011",
588 "RestartCount": 0,
589 "Driver": "overlay2",
590 "Platform": "linux",
591 "MountLabel": "",
592 "ProcessLabel": "",
593 "AppArmorProfile": "",
594 "ExecIDs": null,
595 "HostConfig": {
596 "Binds": null,
597 "ContainerIDFile": "",
598 "LogConfig": {
599 "Type": "json-file",
600 "Config": {}
601 },
602 "NetworkMode": "default",
603 "PortBindings": {},
604 "RestartPolicy": {
605 "Name": "no",
606 "MaximumRetryCount": 0
607 },
608 "AutoRemove": false,
609 "VolumeDriver": "",
610 "VolumesFrom": null,
611 "CapAdd": null,
612 "CapDrop": null,
613 "Dns": [],
614 "DnsOptions": [],
615 "DnsSearch": [],
616 "ExtraHosts": null,
617 "GroupAdd": null,
618 "IpcMode": "shareable",
619 "Cgroup": "",
620 "Links": null,
621 "OomScoreAdj": 0,
622 "PidMode": "",
623 "Privileged": false,
624 "PublishAllPorts": false,
625 "ReadonlyRootfs": false,
626 "SecurityOpt": null,
627 "UTSMode": "",
628 "UsernsMode": "",
629 "ShmSize": 67108864,
630 "Runtime": "runc",
631 "ConsoleSize": [
632 0,
633 0
634 ],
635 "Isolation": "",
636 "CpuShares": 0,
637 "Memory": 0,
638 "NanoCpus": 0,
639 "CgroupParent": "",
640 "BlkioWeight": 0,
641 "BlkioWeightDevice": [],
642 "BlkioDeviceReadBps": null,
643 "BlkioDeviceWriteBps": null,
644 "BlkioDeviceReadIOps": null,
645 "BlkioDeviceWriteIOps": null,
646 "CpuPeriod": 0,
647 "CpuQuota": 0,
648 "CpuRealtimePeriod": 0,
649 "CpuRealtimeRuntime": 0,
650 "CpusetCpus": "",
651 "CpusetMems": "",
652 "Devices": [],
653 "DeviceCgroupRules": null,
654 "DiskQuota": 0,
655 "KernelMemory": 0,
656 "MemoryReservation": 0,
657 "MemorySwap": 0,
658 "MemorySwappiness": null,
659 "OomKillDisable": false,
660 "PidsLimit": 0,
661 "Ulimits": null,
662 "CpuCount": 0,
663 "CpuPercent": 0,
664 "IOMaximumIOps": 0,
665 "IOMaximumBandwidth": 0,
666 "MaskedPaths": [
667 "/proc/asound",
668 "/proc/acpi",
669 "/proc/kcore",
670 "/proc/keys",
671 "/proc/latency_stats",
672 "/proc/timer_list",
673 "/proc/timer_stats",
674 "/proc/sched_debug",
675 "/proc/scsi",
676 "/sys/firmware"
677 ],
678 "ReadonlyPaths": [
679 "/proc/bus",
680 "/proc/fs",
681 "/proc/irq",
682 "/proc/sys",
683 "/proc/sysrq-trigger"
684 ]
685 },
686 "GraphDriver": {
687 "Data": {
688 "LowerDir": "/var/lib/docker/overlay2/4f0d23bda67eda026fb7826b49f681a2cacf346123f9e2f14b4e43b1beae16e1-init/diff:/var/lib/docker/overlay2/9c0ca0f9cb8915c9f9fc59b81706df70f34164e951b5caddb0d1c9597d591dfa/diff:/var/lib/docker/overlay2/8acb1fbbb0b769e329775b421ac7f45471a7a883135e07580293c44361bfa074/diff:/var/lib/docker/overlay2/024ae7376e2767a38ea6a061fca98b1b0b2c08c6e92bcb381f20d52028b45c28/diff:/var/lib/docker/overlay2/20de46df606cff7586f44b1be4496421652dc7e5e8d3e3b96cef0c5148b53628/diff:/var/lib/docker/overlay2/5e7657a45d5baa339853eeef3097be314950876128375ae602d7d7bd5afd091c/diff:/var/lib/docker/overlay2/4e3ba4141a755a85f41cba672d1d37fc131586209e8c42f3fe44380293ae3ea4/diff:/var/lib/docker/overlay2/3b00b571e64a50262a496011d7ee58220bcc012b3151795676178769ec8de4b5/diff:/var/lib/docker/overlay2/4e9037245c018f50cc8ee9ae7f040705d818e2789ce583bf01ece2a31c39a731/diff:/var/lib/docker/overlay2/5f7469f2bf3e1f2d6c6b4669e770894d62edcbb5d934953672688a4cc6366f23/diff:/var/lib/docker/overlay2/bec04818f780d7bd96af12b51faa8b31a4ea77f035ead981acc5176d7447ac71/diff:/var/lib/docker/overlay2/3a7d24776a52597d6683812942454f8309066457fb7476af18e12fe853540984/diff:/var/lib/docker/overlay2/3fb900812177bb70e034cb9c11e396105e0246445726022076d7a48c047abe18/diff",
689 "MergedDir": "/var/lib/docker/overlay2/4f0d23bda67eda026fb7826b49f681a2cacf346123f9e2f14b4e43b1beae16e1/merged",
690 "UpperDir": "/var/lib/docker/overlay2/4f0d23bda67eda026fb7826b49f681a2cacf346123f9e2f14b4e43b1beae16e1/diff",
691 "WorkDir": "/var/lib/docker/overlay2/4f0d23bda67eda026fb7826b49f681a2cacf346123f9e2f14b4e43b1beae16e1/work"
692 },
693 "Name": "overlay2"
694 },
695 "Mounts": [
696 {
697 "Type": "volume",
698 "Name": "b77834b313da025e451ed8b827350e811342c3e78e082a55201b431044336350",
699 "Source": "/var/lib/docker/volumes/b77834b313da025e451ed8b827350e811342c3e78e082a55201b431044336350/_data",
700 "Destination": "/var/lib/mysql",
701 "Driver": "local",
702 "Mode": "",
703 "RW": true,
704 "Propagation": ""
705 }
706 ],
707 "Config": {
708 "Hostname": "637a60cf6947",
709 "Domainname": "",
710 "User": "",
711 "AttachStdin": false,
712 "AttachStdout": false,
713 "AttachStderr": false,
714 "ExposedPorts": {
715 "3306/tcp": {},
716 "33060/tcp": {}
717 },
718 "Tty": false,
719 "OpenStdin": false,
720 "StdinOnce": false,
721 "Env": [
722 "MYSQL_ROOT_PASSWORD=mysuperpassword",
723 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
724 "GOSU_VERSION=1.7",
725 "MYSQL_MAJOR=8.0",
726 "MYSQL_VERSION=8.0.15-1debian9"
727 ],
728 "Cmd": [
729 "mysqld"
730 ],
731 "ArgsEscaped": true,
732 "Image": "mysql:latest",
733 "Volumes": {
734 "/var/lib/mysql": {}
735 },
736 "WorkingDir": "",
737 "Entrypoint": [
738 "docker-entrypoint.sh"
739 ],
740 "OnBuild": null,
741 "Labels": {}
742 },
743 "NetworkSettings": {
744 "Bridge": "",
745 "SandboxID": "6686a40899fe5d290f1ae7aae346f35edee9e0350f15de94813119fef1b9485a",
746 "HairpinMode": false,
747 "LinkLocalIPv6Address": "",
748 "LinkLocalIPv6PrefixLen": 0,
749 "Ports": {
750 "3306/tcp": null,
751 "33060/tcp": null
752 },
753 "SandboxKey": "/var/run/docker/netns/6686a40899fe",
754 "SecondaryIPAddresses": null,
755 "SecondaryIPv6Addresses": null,
756 "EndpointID": "f3949581bce3716ce15d52532c22d01a3f4255027a2e5796e827c0ec05846552",
757 "Gateway": "172.17.0.1",
758 "GlobalIPv6Address": "",
759 "GlobalIPv6PrefixLen": 0,
760 "IPAddress": "172.17.0.2",
761 "IPPrefixLen": 16,
762 "IPv6Gateway": "",
763 "MacAddress": "02:42:ac:11:00:02",
764 "Networks": {
765 "bridge": {
766 "IPAMConfig": null,
767 "Links": null,
768 "Aliases": null,
769 "NetworkID": "1589feb58c8c8a136854c0302e843d3140508b5fd7e890a2c1897421e2b29fe5",
770 "EndpointID": "f3949581bce3716ce15d52532c22d01a3f4255027a2e5796e827c0ec05846552",
771 "Gateway": "172.17.0.1",
772 "IPAddress": "172.17.0.2",
773 "IPPrefixLen": 16,
774 "IPv6Gateway": "",
775 "GlobalIPv6Address": "",
776 "GlobalIPv6PrefixLen": 0,
777 "MacAddress": "02:42:ac:11:00:02",
778 "DriverOpts": null
779 }
780 }
781 }
782 }
783]
784root@server-1:/home/debian# docker container logs mysqlSteven011
785Initializing database
7862019-03-28T09:55:37.734780Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
7872019-03-28T09:55:37.734886Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.15) initializing of server in progress as process 27
7882019-03-28T09:55:44.862953Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
7892019-03-28T09:55:48.267175Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.15) initializing of server has completed
790Database initialized
791MySQL init process in progress...
792MySQL init process in progress...
793MySQL init process in progress...
794MySQL init process in progress...
795MySQL init process in progress...
796mbind: Operation not permitted
7972019-03-28T09:55:52.460586Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
7982019-03-28T09:55:52.460702Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 78
7992019-03-28T09:55:55.383948Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
8002019-03-28T09:55:55.400376Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
8012019-03-28T09:55:55.428935Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.15' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
8022019-03-28T09:55:55.684419Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
803Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
804Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
805Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
806Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
807
8082019-03-28T09:56:01.932150Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.15) MySQL Community Server - GPL.
809
810MySQL init process done. Ready for start up.
811
8122019-03-28T09:56:02.426170Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
8132019-03-28T09:56:02.426297Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 1
8142019-03-28T09:56:03.936967Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
8152019-03-28T09:56:03.946227Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
8162019-03-28T09:56:03.967965Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.15' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
8172019-03-28T09:56:04.067427Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
818root@server-1:/home/debian# docker container top mysql
819Error response from daemon: No such container: mysql
820root@server-1:/home/debian# docker container top mysqlSteven011
821UID PID PPID C STIME TTY TIME CMD
822999 21992 21974 1 09:55 ? 00:00:03 mysqld
823root@server-1:/home/debian# ps -A
824 PID TTY TIME CMD
825 1 ? 00:00:01 systemd
826 2 ? 00:00:00 kthreadd
827 3 ? 00:00:00 ksoftirqd/0
828 5 ? 00:00:00 kworker/0:0H
829 7 ? 00:00:00 rcu_sched
830 8 ? 00:00:00 rcu_bh
831 9 ? 00:00:00 migration/0
832 10 ? 00:00:00 lru-add-drain
833 11 ? 00:00:00 watchdog/0
834 12 ? 00:00:00 cpuhp/0
835 13 ? 00:00:00 kdevtmpfs
836 14 ? 00:00:00 netns
837 15 ? 00:00:00 khungtaskd
838 16 ? 00:00:00 oom_reaper
839 17 ? 00:00:00 writeback
840 18 ? 00:00:00 kcompactd0
841 20 ? 00:00:00 ksmd
842 21 ? 00:00:00 khugepaged
843 22 ? 00:00:00 crypto
844 23 ? 00:00:00 kintegrityd
845 24 ? 00:00:00 bioset
846 25 ? 00:00:00 kblockd
847 26 ? 00:00:00 devfreq_wq
848 27 ? 00:00:00 watchdogd
849 28 ? 00:00:00 kswapd0
850 29 ? 00:00:00 vmstat
851 41 ? 00:00:00 kthrotld
852 42 ? 00:00:00 ipv6_addrconf
853 75 ? 00:00:00 bioset
854 76 ? 00:00:00 bioset
855 77 ? 00:00:00 ata_sff
856 78 ? 00:00:00 bioset
857 79 ? 00:00:00 bioset
858 80 ? 00:00:00 bioset
859 82 ? 00:00:00 bioset
860 84 ? 00:00:00 bioset
861 86 ? 00:00:00 bioset
862 101 ? 00:00:00 scsi_eh_0
863 103 ? 00:00:00 scsi_tmf_0
864 105 ? 00:00:00 scsi_eh_1
865 107 ? 00:00:00 scsi_tmf_1
866 116 ? 00:00:00 scsi_eh_2
867 117 ? 00:00:00 scsi_tmf_2
868 118 ? 00:00:00 bioset
869 375 ? 00:00:00 kworker/0:1H
870 393 ? 00:00:00 kworker/u3:0
871 444 ? 00:00:00 jbd2/sda1-8
872 445 ? 00:00:00 ext4-rsv-conver
873 477 ? 00:00:00 systemd-journal
874 495 ? 00:00:00 kauditd
875 513 ? 00:00:00 systemd-udevd
876 556 ? 00:00:00 ttm_swap
877 640 ? 00:00:00 systemd-timesyn
878 700 ? 00:00:00 dhclient
879 788 ? 00:00:00 rsyslogd
880 789 ? 00:00:00 dbus-daemon
881 793 ? 00:00:00 cron
882 796 ? 00:00:00 systemd-logind
883 800 tty1 00:00:00 agetty
884 802 ttyS0 00:00:00 agetty
885 973 ? 00:00:00 kworker/0:0
886 989 ? 00:00:00 sshd
887 995 ? 00:00:00 sshd
888 996 pts/0 00:00:00 bash
889 1008 pts/0 00:00:00 sudo
890 1009 pts/0 00:00:00 su
891 1010 pts/0 00:00:00 bash
89219273 ? 00:00:00 sshd
89320501 ? 00:00:00 containerd
89421381 ? 00:00:17 dockerd
89521602 ? 00:00:00 kworker/u2:0
89621837 ? 00:00:00 kworker/0:1
89721925 ? 00:00:00 kworker/u2:2
89821974 ? 00:00:00 containerd-shim
89921992 ? 00:00:04 mysqld
90022259 pts/0 00:00:00 ps
901root@server-1:/home/debian# ps -A | grep mysql
90221992 ? 00:00:04 mysqld
903root@server-1:/home/debian# docker container top mysqlSteven011
904UID PID PPID C STIME TTY TIME CMD
905999 21992 21974 0 09:55 ? 00:00:04 mysqld
906root@server-1:/home/debian# docker pull debian
907Using default tag: latest
908latest: Pulling from library/debian
909e79bb959ec00: Pull complete
910Digest: sha256:724b0fbbda7fda6372ffed586670573c59e07a48c86d606bab05db118abe0ef5
911Status: Downloaded newer image for debian:latest
912root@server-1:/home/debian# docker image ls
913REPOSITORY TAG IMAGE ID CREATED SIZE
914mysql latest 7bb2586065cd 34 hours ago 477MB
915debian latest 2d337f242f07 35 hours ago 101MB
916ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
917hello-world latest fce289e99eb9 2 months ago 1.84kB
918root@server-1:/home/debian# docker container run debian
919root@server-1:/home/debian# docker container run debian ls -l
920total 64
921drwxr-xr-x 2 root root 4096 Mar 26 12:00 bin
922drwxr-xr-x 2 root root 4096 Feb 3 13:01 boot
923drwxr-xr-x 5 root root 340 Mar 28 10:07 dev
924drwxr-xr-x 1 root root 4096 Mar 28 10:07 etc
925drwxr-xr-x 2 root root 4096 Feb 3 13:01 home
926drwxr-xr-x 8 root root 4096 Mar 26 12:00 lib
927drwxr-xr-x 2 root root 4096 Mar 26 12:00 lib64
928drwxr-xr-x 2 root root 4096 Mar 26 12:00 media
929drwxr-xr-x 2 root root 4096 Mar 26 12:00 mnt
930drwxr-xr-x 2 root root 4096 Mar 26 12:00 opt
931dr-xr-xr-x 91 root root 0 Mar 28 10:07 proc
932drwx------ 2 root root 4096 Mar 26 12:00 root
933drwxr-xr-x 3 root root 4096 Mar 26 12:00 run
934drwxr-xr-x 2 root root 4096 Mar 26 12:00 sbin
935drwxr-xr-x 2 root root 4096 Mar 26 12:00 srv
936dr-xr-xr-x 13 root root 0 Mar 28 10:07 sys
937drwxrwxrwt 2 root root 4096 Mar 26 12:00 tmp
938drwxr-xr-x 10 root root 4096 Mar 26 12:00 usr
939drwxr-xr-x 11 root root 4096 Mar 26 12:00 var
940root@server-1:/home/debian# docker container run -it debian
941root@f9fc4a0d8cc9:/# ls -l
942total 64
943drwxr-xr-x 2 root root 4096 Mar 26 12:00 bin
944drwxr-xr-x 2 root root 4096 Feb 3 13:01 boot
945drwxr-xr-x 5 root root 360 Mar 28 10:09 dev
946drwxr-xr-x 1 root root 4096 Mar 28 10:09 etc
947drwxr-xr-x 2 root root 4096 Feb 3 13:01 home
948drwxr-xr-x 8 root root 4096 Mar 26 12:00 lib
949drwxr-xr-x 2 root root 4096 Mar 26 12:00 lib64
950drwxr-xr-x 2 root root 4096 Mar 26 12:00 media
951drwxr-xr-x 2 root root 4096 Mar 26 12:00 mnt
952drwxr-xr-x 2 root root 4096 Mar 26 12:00 opt
953dr-xr-xr-x 91 root root 0 Mar 28 10:09 proc
954drwx------ 2 root root 4096 Mar 26 12:00 root
955drwxr-xr-x 3 root root 4096 Mar 26 12:00 run
956drwxr-xr-x 2 root root 4096 Mar 26 12:00 sbin
957drwxr-xr-x 2 root root 4096 Mar 26 12:00 srv
958dr-xr-xr-x 13 root root 0 Mar 28 10:07 sys
959drwxrwxrwt 2 root root 4096 Mar 26 12:00 tmp
960drwxr-xr-x 10 root root 4096 Mar 26 12:00 usr
961drwxr-xr-x 11 root root 4096 Mar 26 12:00 var
962root@f9fc4a0d8cc9:/# uname -a
963Linux f9fc4a0d8cc9 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
964root@f9fc4a0d8cc9:/# iptables -L
965bash: iptables: command not found
966root@f9fc4a0d8cc9:/# apt-get install iptables
967Reading package lists... Done
968Building dependency tree
969Reading state information... Done
970E: Unable to locate package iptables
971root@f9fc4a0d8cc9:/# iptables -L
972bash: iptables: command not found
973root@f9fc4a0d8cc9:/# apt-get updates
974E: Invalid operation updates
975root@f9fc4a0d8cc9:/# apt-get update
976Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
977Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
978Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
979Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
980Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
981Get:6 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [481 kB]
982Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
983Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7084 kB]
984Fetched 7881 kB in 2s (3023 kB/s)
985Reading package lists... Done
986root@f9fc4a0d8cc9:/# apt-get install iptables
987Reading package lists... Done
988Building dependency tree
989Reading state information... Done
990The following additional packages will be installed:
991 libip4tc0 libip6tc0 libiptc0 libnetfilter-conntrack3 libnfnetlink0 libxtables12
992Suggested packages:
993 kmod
994The following NEW packages will be installed:
995 iptables libip4tc0 libip6tc0 libiptc0 libnetfilter-conntrack3 libnfnetlink0 libxtables12
9960 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
997Need to get 609 kB of archives.
998After this operation, 2222 kB of additional disk space will be used.
999Do you want to continue? [Y/n] y
1000Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnfnetlink0 amd64 1.0.1-3 [13.5 kB]
1001Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libip4tc0 amd64 1.6.0+snapshot20161117-6 [67.8 kB]
1002Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libip6tc0 amd64 1.6.0+snapshot20161117-6 [68.1 kB]
1003Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libiptc0 amd64 1.6.0+snapshot20161117-6 [57.5 kB]
1004Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libxtables12 amd64 1.6.0+snapshot20161117-6 [75.9 kB]
1005Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnetfilter-conntrack3 amd64 1.0.6-2 [38.7 kB]
1006Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 iptables amd64 1.6.0+snapshot20161117-6 [288 kB]
1007Fetched 609 kB in 0s (1690 kB/s)
1008debconf: delaying package configuration, since apt-utils is not installed
1009Selecting previously unselected package libnfnetlink0:amd64.
1010(Reading database ... 6499 files and directories currently installed.)
1011Preparing to unpack .../0-libnfnetlink0_1.0.1-3_amd64.deb ...
1012Unpacking libnfnetlink0:amd64 (1.0.1-3) ...
1013Selecting previously unselected package libip4tc0:amd64.
1014Preparing to unpack .../1-libip4tc0_1.6.0+snapshot20161117-6_amd64.deb ...
1015Unpacking libip4tc0:amd64 (1.6.0+snapshot20161117-6) ...
1016Selecting previously unselected package libip6tc0:amd64.
1017Preparing to unpack .../2-libip6tc0_1.6.0+snapshot20161117-6_amd64.deb ...
1018Unpacking libip6tc0:amd64 (1.6.0+snapshot20161117-6) ...
1019Selecting previously unselected package libiptc0:amd64.
1020Preparing to unpack .../3-libiptc0_1.6.0+snapshot20161117-6_amd64.deb ...
1021Unpacking libiptc0:amd64 (1.6.0+snapshot20161117-6) ...
1022Selecting previously unselected package libxtables12:amd64.
1023Preparing to unpack .../4-libxtables12_1.6.0+snapshot20161117-6_amd64.deb ...
1024Unpacking libxtables12:amd64 (1.6.0+snapshot20161117-6) ...
1025Selecting previously unselected package libnetfilter-conntrack3:amd64.
1026Preparing to unpack .../5-libnetfilter-conntrack3_1.0.6-2_amd64.deb ...
1027Unpacking libnetfilter-conntrack3:amd64 (1.0.6-2) ...
1028Selecting previously unselected package iptables.
1029Preparing to unpack .../6-iptables_1.6.0+snapshot20161117-6_amd64.deb ...
1030Unpacking iptables (1.6.0+snapshot20161117-6) ...
1031Setting up libip4tc0:amd64 (1.6.0+snapshot20161117-6) ...
1032Processing triggers for libc-bin (2.24-11+deb9u4) ...
1033Setting up libxtables12:amd64 (1.6.0+snapshot20161117-6) ...
1034Setting up libnfnetlink0:amd64 (1.0.1-3) ...
1035Setting up libip6tc0:amd64 (1.6.0+snapshot20161117-6) ...
1036Setting up libnetfilter-conntrack3:amd64 (1.0.6-2) ...
1037Setting up libiptc0:amd64 (1.6.0+snapshot20161117-6) ...
1038Setting up iptables (1.6.0+snapshot20161117-6) ...
1039Processing triggers for libc-bin (2.24-11+deb9u4) ...
1040root@f9fc4a0d8cc9:/# iptables -L
1041iptables v1.6.0: can't initialize iptables table `filter': Permission denied (you must be root)
1042Perhaps iptables or your kernel needs to be upgraded.
1043root@f9fc4a0d8cc9:/# exit
1044exit
1045root@server-1:/home/debian# docker container ls
1046CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1047637a60cf6947 mysql:latest "docker-entrypoint.s…" 16 minutes ago Up 16 minutes 3306/tcp, 33060/tcp mysqlSteven011
1048root@server-1:/home/debian# docker container ls -a
1049CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1050f9fc4a0d8cc9 debian "bash" 4 minutes ago Exited (3) About a minute ago vigorous_khorana
1051abd18414798b debian "ls -l" 5 minutes ago Exited (0) 5 minutes ago relaxed_bose
10528b947c92b3f9 debian "bash" 6 minutes ago Exited (0) 6 minutes ago stupefied_perlman
1053637a60cf6947 mysql:latest "docker-entrypoint.s…" 17 minutes ago Up 17 minutes 3306/tcp, 33060/tcp mysqlSteven011
1054446696402fbb ubuntu "bash" 22 minutes ago Exited (0) 20 minutes ago nervous_ride
1055a2cae60a56c2 hello-world "/hello" 26 minutes ago Exited (0) 26 minutes ago sleepy_edison
1056root@server-1:/home/debian# docker container run --detach --name stevenwebserver -p 80:80 nginx:latest
1057Unable to find image 'nginx:latest' locally
1058latest: Pulling from library/nginx
105927833a3ba0a5: Already exists
1060e83729dd399a: Pull complete
1061ebc6a67df66d: Pull complete
1062Digest: sha256:c8a861b8a1eeef6d48955a6c6d5dff8e2580f13ff4d0f549e082e7c82a8617a2
1063Status: Downloaded newer image for nginx:latest
10641b344a2fcbe91c316d57b2c2c918bb297f5d7ad7ab2d0fafec9bf5edcc9eb5e1
1065root@server-1:/home/debian# docker container ls
1066CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
10671b344a2fcbe9 nginx:latest "nginx -g 'daemon of…" 48 seconds ago Up 47 seconds 0.0.0.0:80->80/tcp stevenwebserver
1068637a60cf6947 mysql:latest "docker-entrypoint.s…" 21 minutes ago Up 21 minutes 3306/tcp, 33060/tcp mysqlSteven011
1069root@server-1:/home/debian# docker port webserver
1070Error: No such container: webserver
1071root@server-1:/home/debian# docker port webserver
1072Error: No such container: webserver
1073root@server-1:/home/debian# docker port stevenwebserver
107480/tcp -> 0.0.0.0:80
1075root@server-1:/home/debian# docker exec -it stevenwebserver bash
1076root@1b344a2fcbe9:/# apt update && apt install curl -y
1077Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
1078Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
1079Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
1080Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
1081Get:5 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [481 kB]
1082Get:6 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
1083Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
1084Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7084 kB]
1085Fetched 7881 kB in 2s (2951 kB/s)
1086Reading package lists... Done
1087Building dependency tree
1088Reading state information... Done
1089All packages are up to date.
1090Reading package lists... Done
1091Building dependency tree
1092Reading state information... Done
1093The following additional packages will be installed:
1094 ca-certificates krb5-locales libcurl3 libffi6 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed4 libidn11 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnettle6 libnghttp2-14 libp11-kit0 libpsl5 librtmp1 libsasl2-2
1095 libsasl2-modules libsasl2-modules-db libssh2-1 libssl1.0.2 libtasn1-6 libunistring0 openssl publicsuffix
1096Suggested packages:
1097 gnutls-bin krb5-doc krb5-user libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql
1098The following NEW packages will be installed:
1099 ca-certificates curl krb5-locales libcurl3 libffi6 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed4 libidn11 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnettle6 libnghttp2-14 libp11-kit0 libpsl5 librtmp1 libsasl2-2
1100 libsasl2-modules libsasl2-modules-db libssh2-1 libssl1.0.2 libtasn1-6 libunistring0 openssl publicsuffix
11010 upgraded, 31 newly installed, 0 to remove and 0 not upgraded.
1102Need to get 6619 kB of archives.
1103After this operation, 16.9 MB of additional disk space will be used.
1104Get:1 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 libssl1.0.2 amd64 1.0.2r-1~deb9u1 [1302 kB]
1105Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 krb5-locales all 1.15-1+deb9u1 [93.8 kB]
1106Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgmp10 amd64 2:6.1.2+dfsg-1 [253 kB]
1107Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnettle6 amd64 3.3-1+b2 [192 kB]
1108Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libhogweed4 amd64 3.3-1+b2 [136 kB]
1109Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libidn11 amd64 1.33-1 [115 kB]
1110Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libffi6 amd64 3.2.1-6 [20.4 kB]
1111Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libp11-kit0 amd64 0.23.3-2 [111 kB]
1112Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libtasn1-6 amd64 4.10-1.1+deb9u1 [50.6 kB]
1113Get:10 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgnutls30 amd64 3.5.8-5+deb9u4 [896 kB]
1114Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkeyutils1 amd64 1.5.9-9 [12.4 kB]
1115Get:12 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkrb5support0 amd64 1.15-1+deb9u1 [61.9 kB]
1116Get:13 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libk5crypto3 amd64 1.15-1+deb9u1 [119 kB]
1117Get:14 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkrb5-3 amd64 1.15-1+deb9u1 [311 kB]
1118Get:15 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgssapi-krb5-2 amd64 1.15-1+deb9u1 [155 kB]
1119Get:16 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3 [68.2 kB]
1120Get:17 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3 [105 kB]
1121Get:18 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libldap-common all 2.4.44+dfsg-5+deb9u2 [85.5 kB]
1122Get:19 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libldap-2.4-2 amd64 2.4.44+dfsg-5+deb9u2 [219 kB]
1123Get:20 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 openssl amd64 1.1.0j-1~deb9u1 [746 kB]
1124Get:21 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 ca-certificates all 20161130+nmu1+deb9u1 [182 kB]
1125Get:22 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libunistring0 amd64 0.9.6+really0.9.3-0.1 [279 kB]
1126Get:23 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libidn2-0 amd64 0.16-1+deb9u1 [60.7 kB]
1127Get:24 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnghttp2-14 amd64 1.18.1-1 [79.1 kB]
1128Get:25 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libpsl5 amd64 0.17.0-3 [41.8 kB]
1129Get:26 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1+b1 [60.4 kB]
1130Get:27 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1 [138 kB]
1131Get:28 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u9 [292 kB]
1132Get:29 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u9 [227 kB]
1133Get:30 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-modules amd64 2.1.27~101-g0780600+dfsg-3 [102 kB]
1134Get:31 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 publicsuffix all 20181003.1334-0+deb9u1 [104 kB]
1135Fetched 6619 kB in 0s (7993 kB/s)
1136debconf: delaying package configuration, since apt-utils is not installed
1137Selecting previously unselected package libssl1.0.2:amd64.
1138(Reading database ... 7027 files and directories currently installed.)
1139Preparing to unpack .../00-libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb ...
1140Unpacking libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ...
1141Selecting previously unselected package krb5-locales.
1142Preparing to unpack .../01-krb5-locales_1.15-1+deb9u1_all.deb ...
1143Unpacking krb5-locales (1.15-1+deb9u1) ...
1144Selecting previously unselected package libgmp10:amd64.
1145Preparing to unpack .../02-libgmp10_2%3a6.1.2+dfsg-1_amd64.deb ...
1146Unpacking libgmp10:amd64 (2:6.1.2+dfsg-1) ...
1147Selecting previously unselected package libnettle6:amd64.
1148Preparing to unpack .../03-libnettle6_3.3-1+b2_amd64.deb ...
1149Unpacking libnettle6:amd64 (3.3-1+b2) ...
1150Selecting previously unselected package libhogweed4:amd64.
1151Preparing to unpack .../04-libhogweed4_3.3-1+b2_amd64.deb ...
1152Unpacking libhogweed4:amd64 (3.3-1+b2) ...
1153Selecting previously unselected package libidn11:amd64.
1154Preparing to unpack .../05-libidn11_1.33-1_amd64.deb ...
1155Unpacking libidn11:amd64 (1.33-1) ...
1156Selecting previously unselected package libffi6:amd64.
1157Preparing to unpack .../06-libffi6_3.2.1-6_amd64.deb ...
1158Unpacking libffi6:amd64 (3.2.1-6) ...
1159Selecting previously unselected package libp11-kit0:amd64.
1160Preparing to unpack .../07-libp11-kit0_0.23.3-2_amd64.deb ...
1161Unpacking libp11-kit0:amd64 (0.23.3-2) ...
1162Selecting previously unselected package libtasn1-6:amd64.
1163Preparing to unpack .../08-libtasn1-6_4.10-1.1+deb9u1_amd64.deb ...
1164Unpacking libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
1165Selecting previously unselected package libgnutls30:amd64.
1166Preparing to unpack .../09-libgnutls30_3.5.8-5+deb9u4_amd64.deb ...
1167Unpacking libgnutls30:amd64 (3.5.8-5+deb9u4) ...
1168Selecting previously unselected package libkeyutils1:amd64.
1169Preparing to unpack .../10-libkeyutils1_1.5.9-9_amd64.deb ...
1170Unpacking libkeyutils1:amd64 (1.5.9-9) ...
1171Selecting previously unselected package libkrb5support0:amd64.
1172Preparing to unpack .../11-libkrb5support0_1.15-1+deb9u1_amd64.deb ...
1173Unpacking libkrb5support0:amd64 (1.15-1+deb9u1) ...
1174Selecting previously unselected package libk5crypto3:amd64.
1175Preparing to unpack .../12-libk5crypto3_1.15-1+deb9u1_amd64.deb ...
1176Unpacking libk5crypto3:amd64 (1.15-1+deb9u1) ...
1177Selecting previously unselected package libkrb5-3:amd64.
1178Preparing to unpack .../13-libkrb5-3_1.15-1+deb9u1_amd64.deb ...
1179Unpacking libkrb5-3:amd64 (1.15-1+deb9u1) ...
1180Selecting previously unselected package libgssapi-krb5-2:amd64.
1181Preparing to unpack .../14-libgssapi-krb5-2_1.15-1+deb9u1_amd64.deb ...
1182Unpacking libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
1183Selecting previously unselected package libsasl2-modules-db:amd64.
1184Preparing to unpack .../15-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1185Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1186Selecting previously unselected package libsasl2-2:amd64.
1187Preparing to unpack .../16-libsasl2-2_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1188Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1189Selecting previously unselected package libldap-common.
1190Preparing to unpack .../17-libldap-common_2.4.44+dfsg-5+deb9u2_all.deb ...
1191Unpacking libldap-common (2.4.44+dfsg-5+deb9u2) ...
1192Selecting previously unselected package libldap-2.4-2:amd64.
1193Preparing to unpack .../18-libldap-2.4-2_2.4.44+dfsg-5+deb9u2_amd64.deb ...
1194Unpacking libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
1195Selecting previously unselected package openssl.
1196Preparing to unpack .../19-openssl_1.1.0j-1~deb9u1_amd64.deb ...
1197Unpacking openssl (1.1.0j-1~deb9u1) ...
1198Selecting previously unselected package ca-certificates.
1199Preparing to unpack .../20-ca-certificates_20161130+nmu1+deb9u1_all.deb ...
1200Unpacking ca-certificates (20161130+nmu1+deb9u1) ...
1201Selecting previously unselected package libunistring0:amd64.
1202Preparing to unpack .../21-libunistring0_0.9.6+really0.9.3-0.1_amd64.deb ...
1203Unpacking libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
1204Selecting previously unselected package libidn2-0:amd64.
1205Preparing to unpack .../22-libidn2-0_0.16-1+deb9u1_amd64.deb ...
1206Unpacking libidn2-0:amd64 (0.16-1+deb9u1) ...
1207Selecting previously unselected package libnghttp2-14:amd64.
1208Preparing to unpack .../23-libnghttp2-14_1.18.1-1_amd64.deb ...
1209Unpacking libnghttp2-14:amd64 (1.18.1-1) ...
1210Selecting previously unselected package libpsl5:amd64.
1211Preparing to unpack .../24-libpsl5_0.17.0-3_amd64.deb ...
1212Unpacking libpsl5:amd64 (0.17.0-3) ...
1213Selecting previously unselected package librtmp1:amd64.
1214Preparing to unpack .../25-librtmp1_2.4+20151223.gitfa8646d.1-1+b1_amd64.deb ...
1215Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
1216Selecting previously unselected package libssh2-1:amd64.
1217Preparing to unpack .../26-libssh2-1_1.7.0-1_amd64.deb ...
1218Unpacking libssh2-1:amd64 (1.7.0-1) ...
1219Selecting previously unselected package libcurl3:amd64.
1220Preparing to unpack .../27-libcurl3_7.52.1-5+deb9u9_amd64.deb ...
1221Unpacking libcurl3:amd64 (7.52.1-5+deb9u9) ...
1222Selecting previously unselected package curl.
1223Preparing to unpack .../28-curl_7.52.1-5+deb9u9_amd64.deb ...
1224Unpacking curl (7.52.1-5+deb9u9) ...
1225Selecting previously unselected package libsasl2-modules:amd64.
1226Preparing to unpack .../29-libsasl2-modules_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1227Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1228Selecting previously unselected package publicsuffix.
1229Preparing to unpack .../30-publicsuffix_20181003.1334-0+deb9u1_all.deb ...
1230Unpacking publicsuffix (20181003.1334-0+deb9u1) ...
1231Setting up libnettle6:amd64 (3.3-1+b2) ...
1232Setting up libnghttp2-14:amd64 (1.18.1-1) ...
1233Setting up libldap-common (2.4.44+dfsg-5+deb9u2) ...
1234Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1235Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1236Setting up libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
1237Setting up libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ...
1238debconf: unable to initialize frontend: Dialog
1239debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
1240debconf: falling back to frontend: Readline
1241debconf: unable to initialize frontend: Readline
1242debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
1243debconf: falling back to frontend: Teletype
1244Setting up libgmp10:amd64 (2:6.1.2+dfsg-1) ...
1245Setting up libssh2-1:amd64 (1.7.0-1) ...
1246Setting up krb5-locales (1.15-1+deb9u1) ...
1247Processing triggers for libc-bin (2.24-11+deb9u4) ...
1248Setting up publicsuffix (20181003.1334-0+deb9u1) ...
1249Setting up libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
1250Setting up openssl (1.1.0j-1~deb9u1) ...
1251Setting up libffi6:amd64 (3.2.1-6) ...
1252Setting up libkeyutils1:amd64 (1.5.9-9) ...
1253Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1254Setting up ca-certificates (20161130+nmu1+deb9u1) ...
1255debconf: unable to initialize frontend: Dialog
1256debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
1257debconf: falling back to frontend: Readline
1258debconf: unable to initialize frontend: Readline
1259debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
1260debconf: falling back to frontend: Teletype
1261Updating certificates in /etc/ssl/certs...
1262151 added, 0 removed; done.
1263Setting up libidn11:amd64 (1.33-1) ...
1264Setting up libidn2-0:amd64 (0.16-1+deb9u1) ...
1265Setting up libpsl5:amd64 (0.17.0-3) ...
1266Setting up libkrb5support0:amd64 (1.15-1+deb9u1) ...
1267Setting up libhogweed4:amd64 (3.3-1+b2) ...
1268Setting up libp11-kit0:amd64 (0.23.3-2) ...
1269Setting up libk5crypto3:amd64 (1.15-1+deb9u1) ...
1270Setting up libgnutls30:amd64 (3.5.8-5+deb9u4) ...
1271Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
1272Setting up libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
1273Setting up libkrb5-3:amd64 (1.15-1+deb9u1) ...
1274Setting up libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
1275Setting up libcurl3:amd64 (7.52.1-5+deb9u9) ...
1276Setting up curl (7.52.1-5+deb9u9) ...
1277Processing triggers for libc-bin (2.24-11+deb9u4) ...
1278Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
1279Updating certificates in /etc/ssl/certs...
12800 added, 0 removed; done.
1281Running hooks in /etc/ca-certificates/update.d...
1282done.
1283root@1b344a2fcbe9:/# curl localhost
1284<!DOCTYPE html>
1285<html>
1286<head>
1287<title>Welcome to nginx!</title>
1288<style>
1289 body {
1290 width: 35em;
1291 margin: 0 auto;
1292 font-family: Tahoma, Verdana, Arial, sans-serif;
1293 }
1294</style>
1295</head>
1296<body>
1297<h1>Welcome to nginx!</h1>
1298<p>If you see this page, the nginx web server is successfully installed and
1299working. Further configuration is required.</p>
1300
1301<p>For online documentation and support please refer to
1302<a href="http://nginx.org/">nginx.org</a>.<br/>
1303Commercial support is available at
1304<a href="http://nginx.com/">nginx.com</a>.</p>
1305
1306<p><em>Thank you for using nginx.</em></p>
1307</body>
1308</html>
1309root@1b344a2fcbe9:/# usr/share/nginx/
1310bash: usr/share/nginx/: Is a directory
1311root@1b344a2fcbe9:/# ls usr/share/nginx/
1312html
1313root@1b344a2fcbe9:/# ls usr/share/nginx/html
131450x.html index.html
1315root@1b344a2fcbe9:/# nano index.html
1316bash: nano: command not found
1317root@1b344a2fcbe9:/# apt-get install nano
1318Reading package lists... Done
1319Building dependency tree
1320Reading state information... Done
1321Suggested packages:
1322 spell
1323The following NEW packages will be installed:
1324 nano
13250 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1326Need to get 485 kB of archives.
1327After this operation, 2092 kB of additional disk space will be used.
1328Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 nano amd64 2.7.4-1 [485 kB]
1329Fetched 485 kB in 0s (1713 kB/s)
1330debconf: delaying package configuration, since apt-utils is not installed
1331Selecting previously unselected package nano.
1332(Reading database ... 7632 files and directories currently installed.)
1333Preparing to unpack .../nano_2.7.4-1_amd64.deb ...
1334Unpacking nano (2.7.4-1) ...
1335Setting up nano (2.7.4-1) ...
1336update-alternatives: using /bin/nano to provide /usr/bin/editor (editor) in auto mode
1337update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/nano.1.gz (of link group editor) doesn't exist
1338update-alternatives: using /bin/nano to provide /usr/bin/pico (pico) in auto mode
1339update-alternatives: warning: skip creation of /usr/share/man/man1/pico.1.gz because associated file /usr/share/man/man1/nano.1.gz (of link group pico) doesn't exist
1340root@1b344a2fcbe9:/# nano index.html
1341root@1b344a2fcbe9:/# nano usr/share/nginx/html/index.html
1342root@1b344a2fcbe9:/# exit
1343exit
1344root@server-1:/home/debian# docker stop stevenwebserver
1345stevenwebserver
1346root@server-1:/home/debian# docker container ls
1347CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1348637a60cf6947 mysql:latest "docker-entrypoint.s…" 32 minutes ago Up 31 minutes 3306/tcp, 33060/tcp mysqlSteven011
1349root@server-1:/home/debian# mkdir nginx && cd nginx
1350root@server-1:/home/debian/nginx# nano index.html
1351root@server-1:/home/debian/nginx# ls
1352index.html
1353root@server-1:/home/debian/nginx# touch Dockerfile
1354root@server-1:/home/debian/nginx# nano Dockerfile
1355root@server-1:/home/debian/nginx# docker build --tag nginx-labsteven .
1356Sending build context to Docker daemon 3.072kB
1357Step 1/4 : FROM nginx:latest
1358 ---> 2bcb04bdb83f
1359Step 2/4 : RUN apt-get update && apt-get install curl -y
1360 ---> Running in 535103ebab2d
1361Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
1362Get:4 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [481 kB]
1363Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
1364Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
1365Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
1366Get:6 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
1367Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
1368Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7084 kB]
1369Fetched 7881 kB in 2s (3100 kB/s)
1370Reading package lists...
1371Reading package lists...
1372Building dependency tree...
1373Reading state information...
1374The following additional packages will be installed:
1375 ca-certificates krb5-locales libcurl3 libffi6 libgmp10 libgnutls30
1376 libgssapi-krb5-2 libhogweed4 libidn11 libidn2-0 libk5crypto3 libkeyutils1
1377 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnettle6
1378 libnghttp2-14 libp11-kit0 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
1379 libsasl2-modules-db libssh2-1 libssl1.0.2 libtasn1-6 libunistring0 openssl
1380 publicsuffix
1381Suggested packages:
1382 gnutls-bin krb5-doc krb5-user libsasl2-modules-gssapi-mit
1383 | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp
1384 libsasl2-modules-sql
1385The following NEW packages will be installed:
1386 ca-certificates curl krb5-locales libcurl3 libffi6 libgmp10 libgnutls30
1387 libgssapi-krb5-2 libhogweed4 libidn11 libidn2-0 libk5crypto3 libkeyutils1
1388 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnettle6
1389 libnghttp2-14 libp11-kit0 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
1390 libsasl2-modules-db libssh2-1 libssl1.0.2 libtasn1-6 libunistring0 openssl
1391 publicsuffix
13920 upgraded, 31 newly installed, 0 to remove and 0 not upgraded.
1393Need to get 6619 kB of archives.
1394After this operation, 16.9 MB of additional disk space will be used.
1395Get:1 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 libssl1.0.2 amd64 1.0.2r-1~deb9u1 [1302 kB]
1396Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 krb5-locales all 1.15-1+deb9u1 [93.8 kB]
1397Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgmp10 amd64 2:6.1.2+dfsg-1 [253 kB]
1398Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnettle6 amd64 3.3-1+b2 [192 kB]
1399Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libhogweed4 amd64 3.3-1+b2 [136 kB]
1400Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libidn11 amd64 1.33-1 [115 kB]
1401Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libffi6 amd64 3.2.1-6 [20.4 kB]
1402Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libp11-kit0 amd64 0.23.3-2 [111 kB]
1403Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libtasn1-6 amd64 4.10-1.1+deb9u1 [50.6 kB]
1404Get:10 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgnutls30 amd64 3.5.8-5+deb9u4 [896 kB]
1405Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkeyutils1 amd64 1.5.9-9 [12.4 kB]
1406Get:12 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkrb5support0 amd64 1.15-1+deb9u1 [61.9 kB]
1407Get:13 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libk5crypto3 amd64 1.15-1+deb9u1 [119 kB]
1408Get:14 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libkrb5-3 amd64 1.15-1+deb9u1 [311 kB]
1409Get:15 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libgssapi-krb5-2 amd64 1.15-1+deb9u1 [155 kB]
1410Get:16 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3 [68.2 kB]
1411Get:17 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3 [105 kB]
1412Get:18 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libldap-common all 2.4.44+dfsg-5+deb9u2 [85.5 kB]
1413Get:19 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libldap-2.4-2 amd64 2.4.44+dfsg-5+deb9u2 [219 kB]
1414Get:20 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 openssl amd64 1.1.0j-1~deb9u1 [746 kB]
1415Get:21 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 ca-certificates all 20161130+nmu1+deb9u1 [182 kB]
1416Get:22 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libunistring0 amd64 0.9.6+really0.9.3-0.1 [279 kB]
1417Get:23 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libidn2-0 amd64 0.16-1+deb9u1 [60.7 kB]
1418Get:24 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libnghttp2-14 amd64 1.18.1-1 [79.1 kB]
1419Get:25 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libpsl5 amd64 0.17.0-3 [41.8 kB]
1420Get:26 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1+b1 [60.4 kB]
1421Get:27 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1 [138 kB]
1422Get:28 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u9 [292 kB]
1423Get:29 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u9 [227 kB]
1424Get:30 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libsasl2-modules amd64 2.1.27~101-g0780600+dfsg-3 [102 kB]
1425Get:31 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 publicsuffix all 20181003.1334-0+deb9u1 [104 kB]
1426debconf: delaying package configuration, since apt-utils is not installed
1427Fetched 6619 kB in 0s (9187 kB/s)
1428Selecting previously unselected package libssl1.0.2:amd64.
1429(Reading database ... 7027 files and directories currently installed.)
1430Preparing to unpack .../00-libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb ...
1431Unpacking libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ...
1432Selecting previously unselected package krb5-locales.
1433Preparing to unpack .../01-krb5-locales_1.15-1+deb9u1_all.deb ...
1434Unpacking krb5-locales (1.15-1+deb9u1) ...
1435Selecting previously unselected package libgmp10:amd64.
1436Preparing to unpack .../02-libgmp10_2%3a6.1.2+dfsg-1_amd64.deb ...
1437Unpacking libgmp10:amd64 (2:6.1.2+dfsg-1) ...
1438Selecting previously unselected package libnettle6:amd64.
1439Preparing to unpack .../03-libnettle6_3.3-1+b2_amd64.deb ...
1440Unpacking libnettle6:amd64 (3.3-1+b2) ...
1441Selecting previously unselected package libhogweed4:amd64.
1442Preparing to unpack .../04-libhogweed4_3.3-1+b2_amd64.deb ...
1443Unpacking libhogweed4:amd64 (3.3-1+b2) ...
1444Selecting previously unselected package libidn11:amd64.
1445Preparing to unpack .../05-libidn11_1.33-1_amd64.deb ...
1446Unpacking libidn11:amd64 (1.33-1) ...
1447Selecting previously unselected package libffi6:amd64.
1448Preparing to unpack .../06-libffi6_3.2.1-6_amd64.deb ...
1449Unpacking libffi6:amd64 (3.2.1-6) ...
1450Selecting previously unselected package libp11-kit0:amd64.
1451Preparing to unpack .../07-libp11-kit0_0.23.3-2_amd64.deb ...
1452Unpacking libp11-kit0:amd64 (0.23.3-2) ...
1453Selecting previously unselected package libtasn1-6:amd64.
1454Preparing to unpack .../08-libtasn1-6_4.10-1.1+deb9u1_amd64.deb ...
1455Unpacking libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
1456Selecting previously unselected package libgnutls30:amd64.
1457Preparing to unpack .../09-libgnutls30_3.5.8-5+deb9u4_amd64.deb ...
1458Unpacking libgnutls30:amd64 (3.5.8-5+deb9u4) ...
1459Selecting previously unselected package libkeyutils1:amd64.
1460Preparing to unpack .../10-libkeyutils1_1.5.9-9_amd64.deb ...
1461Unpacking libkeyutils1:amd64 (1.5.9-9) ...
1462Selecting previously unselected package libkrb5support0:amd64.
1463Preparing to unpack .../11-libkrb5support0_1.15-1+deb9u1_amd64.deb ...
1464Unpacking libkrb5support0:amd64 (1.15-1+deb9u1) ...
1465Selecting previously unselected package libk5crypto3:amd64.
1466Preparing to unpack .../12-libk5crypto3_1.15-1+deb9u1_amd64.deb ...
1467Unpacking libk5crypto3:amd64 (1.15-1+deb9u1) ...
1468Selecting previously unselected package libkrb5-3:amd64.
1469Preparing to unpack .../13-libkrb5-3_1.15-1+deb9u1_amd64.deb ...
1470Unpacking libkrb5-3:amd64 (1.15-1+deb9u1) ...
1471Selecting previously unselected package libgssapi-krb5-2:amd64.
1472Preparing to unpack .../14-libgssapi-krb5-2_1.15-1+deb9u1_amd64.deb ...
1473Unpacking libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
1474Selecting previously unselected package libsasl2-modules-db:amd64.
1475Preparing to unpack .../15-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1476Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1477Selecting previously unselected package libsasl2-2:amd64.
1478Preparing to unpack .../16-libsasl2-2_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1479Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1480Selecting previously unselected package libldap-common.
1481Preparing to unpack .../17-libldap-common_2.4.44+dfsg-5+deb9u2_all.deb ...
1482Unpacking libldap-common (2.4.44+dfsg-5+deb9u2) ...
1483Selecting previously unselected package libldap-2.4-2:amd64.
1484Preparing to unpack .../18-libldap-2.4-2_2.4.44+dfsg-5+deb9u2_amd64.deb ...
1485Unpacking libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
1486Selecting previously unselected package openssl.
1487Preparing to unpack .../19-openssl_1.1.0j-1~deb9u1_amd64.deb ...
1488Unpacking openssl (1.1.0j-1~deb9u1) ...
1489Selecting previously unselected package ca-certificates.
1490Preparing to unpack .../20-ca-certificates_20161130+nmu1+deb9u1_all.deb ...
1491Unpacking ca-certificates (20161130+nmu1+deb9u1) ...
1492Selecting previously unselected package libunistring0:amd64.
1493Preparing to unpack .../21-libunistring0_0.9.6+really0.9.3-0.1_amd64.deb ...
1494Unpacking libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
1495Selecting previously unselected package libidn2-0:amd64.
1496Preparing to unpack .../22-libidn2-0_0.16-1+deb9u1_amd64.deb ...
1497Unpacking libidn2-0:amd64 (0.16-1+deb9u1) ...
1498Selecting previously unselected package libnghttp2-14:amd64.
1499Preparing to unpack .../23-libnghttp2-14_1.18.1-1_amd64.deb ...
1500Unpacking libnghttp2-14:amd64 (1.18.1-1) ...
1501Selecting previously unselected package libpsl5:amd64.
1502Preparing to unpack .../24-libpsl5_0.17.0-3_amd64.deb ...
1503Unpacking libpsl5:amd64 (0.17.0-3) ...
1504Selecting previously unselected package librtmp1:amd64.
1505Preparing to unpack .../25-librtmp1_2.4+20151223.gitfa8646d.1-1+b1_amd64.deb ...
1506Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
1507Selecting previously unselected package libssh2-1:amd64.
1508Preparing to unpack .../26-libssh2-1_1.7.0-1_amd64.deb ...
1509Unpacking libssh2-1:amd64 (1.7.0-1) ...
1510Selecting previously unselected package libcurl3:amd64.
1511Preparing to unpack .../27-libcurl3_7.52.1-5+deb9u9_amd64.deb ...
1512Unpacking libcurl3:amd64 (7.52.1-5+deb9u9) ...
1513Selecting previously unselected package curl.
1514Preparing to unpack .../28-curl_7.52.1-5+deb9u9_amd64.deb ...
1515Unpacking curl (7.52.1-5+deb9u9) ...
1516Selecting previously unselected package libsasl2-modules:amd64.
1517Preparing to unpack .../29-libsasl2-modules_2.1.27~101-g0780600+dfsg-3_amd64.deb ...
1518Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1519Selecting previously unselected package publicsuffix.
1520Preparing to unpack .../30-publicsuffix_20181003.1334-0+deb9u1_all.deb ...
1521Unpacking publicsuffix (20181003.1334-0+deb9u1) ...
1522Setting up libnettle6:amd64 (3.3-1+b2) ...
1523Setting up libnghttp2-14:amd64 (1.18.1-1) ...
1524Setting up libldap-common (2.4.44+dfsg-5+deb9u2) ...
1525Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1526Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1527Setting up libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
1528Setting up libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ...
1529debconf: unable to initialize frontend: Dialog
1530debconf: (TERM is not set, so the dialog frontend is not usable.)
1531debconf: falling back to frontend: Readline
1532debconf: unable to initialize frontend: Readline
1533debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
1534debconf: falling back to frontend: Teletype
1535Setting up libgmp10:amd64 (2:6.1.2+dfsg-1) ...
1536Setting up libssh2-1:amd64 (1.7.0-1) ...
1537Setting up krb5-locales (1.15-1+deb9u1) ...
1538Processing triggers for libc-bin (2.24-11+deb9u4) ...
1539Setting up publicsuffix (20181003.1334-0+deb9u1) ...
1540Setting up libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
1541Setting up openssl (1.1.0j-1~deb9u1) ...
1542Setting up libffi6:amd64 (3.2.1-6) ...
1543Setting up libkeyutils1:amd64 (1.5.9-9) ...
1544Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3) ...
1545Setting up ca-certificates (20161130+nmu1+deb9u1) ...
1546debconf: unable to initialize frontend: Dialog
1547debconf: (TERM is not set, so the dialog frontend is not usable.)
1548debconf: falling back to frontend: Readline
1549debconf: unable to initialize frontend: Readline
1550debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
1551debconf: falling back to frontend: Teletype
1552Updating certificates in /etc/ssl/certs...
1553151 added, 0 removed; done.
1554Setting up libidn11:amd64 (1.33-1) ...
1555Setting up libidn2-0:amd64 (0.16-1+deb9u1) ...
1556Setting up libpsl5:amd64 (0.17.0-3) ...
1557Setting up libkrb5support0:amd64 (1.15-1+deb9u1) ...
1558Setting up libhogweed4:amd64 (3.3-1+b2) ...
1559Setting up libp11-kit0:amd64 (0.23.3-2) ...
1560Setting up libk5crypto3:amd64 (1.15-1+deb9u1) ...
1561Setting up libgnutls30:amd64 (3.5.8-5+deb9u4) ...
1562Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
1563Setting up libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u2) ...
1564Setting up libkrb5-3:amd64 (1.15-1+deb9u1) ...
1565Setting up libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
1566Setting up libcurl3:amd64 (7.52.1-5+deb9u9) ...
1567Setting up curl (7.52.1-5+deb9u9) ...
1568Processing triggers for libc-bin (2.24-11+deb9u4) ...
1569Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
1570Updating certificates in /etc/ssl/certs...
15710 added, 0 removed; done.
1572Running hooks in /etc/ca-certificates/update.d...
1573done.
1574Removing intermediate container 535103ebab2d
1575 ---> 2b7388460374
1576Step 3/4 : COPY index.html /usr/share/nginx/html
1577 ---> daa3ef039c38
1578Step 4/4 : EXPOSE 80
1579 ---> Running in d6dbe77e382c
1580Removing intermediate container d6dbe77e382c
1581 ---> 9dae4eb37a7b
1582Successfully built 9dae4eb37a7b
1583Successfully tagged nginx-labsteven:latest
1584root@server-1:/home/debian/nginx# docker images
1585REPOSITORY TAG IMAGE ID CREATED SIZE
1586nginx-labsteven latest 9dae4eb37a7b 24 seconds ago 142MB
1587mysql latest 7bb2586065cd 35 hours ago 477MB
1588nginx latest 2bcb04bdb83f 35 hours ago 109MB
1589debian latest 2d337f242f07 36 hours ago 101MB
1590ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
1591hello-world latest fce289e99eb9 2 months ago 1.84kB
1592root@server-1:/home/debian/nginx# docker container run --detach --name nginx-lab-Stevencontainer -p 80:80 nginx-labsteven
159357525e7524fa7c37d803f622717f32092d96cdd95a2bf358e499a219377891ce
1594root@server-1:/home/debian/nginx# docker container ls
1595CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
159657525e7524fa nginx-labsteven "nginx -g 'daemon of…" 13 seconds ago Up 12 seconds 0.0.0.0:80->80/tcp nginx-lab-Stevencontainer
1597637a60cf6947 mysql:latest "docker-entrypoint.s…" 42 minutes ago Up 42 minutes 3306/tcp, 33060/tcp mysqlSteven011
1598root@server-1:/home/debian/nginx# docker login -u 2tcvrt2sq2ih -p jioHbjMRRKbHdjkarTW3 registry.containers.ovh.net
1599WARNING! Using --password via the CLI is insecure. Use --password-stdin.
1600WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
1601Configure a credential helper to remove this warning. See
1602https://docs.docker.com/engine/reference/commandline/login/#credentials-store
1603
1604Login Succeeded
1605root@server-1:/home/debian/nginx# docker tag nginx-labsteven registry.containers.ovh.net/training/nginx-labsteven
1606root@server-1:/home/debian/nginx# docker image -ls
1607unknown shorthand flag: 'l' in -ls
1608See 'docker image --help'.
1609
1610Usage: docker image COMMAND
1611
1612Manage images
1613
1614Commands:
1615 build Build an image from a Dockerfile
1616 history Show the history of an image
1617 import Import the contents from a tarball to create a filesystem image
1618 inspect Display detailed information on one or more images
1619 load Load an image from a tar archive or STDIN
1620 ls List images
1621 prune Remove unused images
1622 pull Pull an image or a repository from a registry
1623 push Push an image or a repository to a registry
1624 rm Remove one or more images
1625 save Save one or more images to a tar archive (streamed to STDOUT by default)
1626 tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
1627
1628Run 'docker image COMMAND --help' for more information on a command.
1629
1630root@server-1:/home/debian/nginx# docker image ls
1631REPOSITORY TAG IMAGE ID CREATED SIZE
1632nginx-labsteven latest 9dae4eb37a7b 7 minutes ago 142MB
1633registry.containers.ovh.net/training/nginx-labsteven latest 9dae4eb37a7b 7 minutes ago 142MB
1634mysql latest 7bb2586065cd 35 hours ago 477MB
1635nginx latest 2bcb04bdb83f 35 hours ago 109MB
1636debian latest 2d337f242f07 36 hours ago 101MB
1637ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
1638hello-world latest fce289e99eb9 2 months ago 1.84kB
1639root@server-1:/home/debian/nginx# docker push registry.containers.ovh.net/training/nginx-labsteven
1640The push refers to repository [registry.containers.ovh.net/training/nginx-labsteven]
16415660b0d74ec9: Pushed
164287e8e5235807: Pushed
16437e274c0effe8: Pushed
1644dd0338cdfab3: Pushed
16455dacd731af1b: Pushed
1646latest: digest: sha256:cecda0c6e8571ac306305f5e8a3e368def8313e7c9747356a786aeaac0e02dff size: 1367
1647root@server-1:/home/debian/nginx# docker images
1648REPOSITORY TAG IMAGE ID CREATED SIZE
1649nginx-labsteven latest 9dae4eb37a7b 9 minutes ago 142MB
1650registry.containers.ovh.net/training/nginx-labsteven latest 9dae4eb37a7b 9 minutes ago 142MB
1651mysql latest 7bb2586065cd 35 hours ago 477MB
1652nginx latest 2bcb04bdb83f 36 hours ago 109MB
1653debian latest 2d337f242f07 36 hours ago 101MB
1654ubuntu latest 94e814e2efa8 2 weeks ago 88.9MB
1655hello-world latest fce289e99eb9 2 months ago 1.84kB
1656root@server-1:/home/debian/nginx#