Day-1: Q3: List of Top 5 docker images from hub.docker.com and create a running container of it and use it
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
1. rabbitmq – https://hub.docker.com/_/rabbitmq
root@ip-172-31-28-155:/tmp# docker run -d --hostname anoop_rabbit2 --name anoop_rabbit2 rabbitmq:3
0726d5cab62b5bfb026127e6b810dc8863398459b3563f414347977894537c4e
root@ip-172-31-28-155:/tmp# docker ps -a | grep anoop_
0726d5cab62b rabbitmq:3 "docker-entrypoint.s…" 6 seconds ago Up 5 seconds 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit2
root@ip-172-31-28-155:/tmp# docker ps -a | grep anoop_
0726d5cab62b rabbitmq:3 "docker-entrypoint.s…" About a minute ago Up About a minute 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit2
9b713d4ed1ff rabbitmq "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbitmq
40377df9192c indrasoftdso/postgressql10 "/usr/local/bin/dock…" 6 minutes ago Exited (1) 6 minutes ago anoop_postgress
root@ip-172-31-28-155:/tmp# docker run -d --hostname anoop_rabbit2 --name anoop_rabbit_management2 rabbitmq:3-management
Unable to find image 'rabbitmq:3-management' locally
3-management: Pulling from library/rabbitmq
16ec32c2132b: Already exists
3adbc39b91c4: Already exists
d9bdef24433b: Already exists
c30ffcfc7791: Already exists
d09f1c15f6ed: Already exists
0e6412cde6ab: Already exists
72a3c57a2525: Already exists
f105f85edcfc: Already exists
5408f9208bcd: Already exists
39e0b328d922: Pull complete
Digest: sha256:87cad55fdc727f68bb158c3cd64f27c7ded996f19f988fef4c7f5734c6cb2af3
Status: Downloaded newer image for rabbitmq:3-management
edbc62c64a735bae4d6ad696021c5f7f0599533669f000fd4e0123e4f865db32
root@ip-172-31-28-155:/tmp# docker ps -a | grep anoop_
edbc62c64a73 rabbitmq:3-management "docker-entrypoint.s…" 42 seconds ago Up 42 seconds 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit_management2
0726d5cab62b rabbitmq:3 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit2
9b713d4ed1ff rabbitmq "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbitmq
40377df9192c indrasoftdso/postgressql10 "/usr/local/bin/dock…" 8 minutes ago Exited (1) 8 minutes ago anoop_postgress
root@ip-172-31-28-155:/tmp# docker run -d --hostname anoop_rabbit2 --name anoop_rabbit_management4 -p 8197:15672 rabbitmq:3-management
3dc1fb93641474998ab5e6fc9be5d1db08bca232061ca5abfc73f1ed83e1a0d8
root@ip-172-31-28-155:/tmp# docker ps -a | grep anoop_
3dc1fb936414 rabbitmq:3-management "docker-entrypoint.s…" 6 seconds ago Up 5 seconds 4369/tcp, 5671-5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:8197->15672/tcp, :::8197->15672/tcp anoop_rabbit_management4
4abba4567b32 rabbitmq:3-management "docker-entrypoint.s…" 47 seconds ago Created anoop_rabbit_management3
edbc62c64a73 rabbitmq:3-management "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit_management2
0726d5cab62b rabbitmq:3 "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbit2
9b713d4ed1ff rabbitmq "docker-entrypoint.s…" 9 minutes ago Up 9 minutes 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp anoop_rabbitmq
40377df9192c indrasoftdso/postgressql10 "/usr/local/bin/dock…" 11 minutes ago Exited (1) 10 minutes ago anoop_postgress
root@ip-172-31-28-155:/tmp# curl http://localhost:8197
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RabbitMQ Management</title>
<script src="js/ejs-1.0.min.js" type="text/javascript"></script>
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/jquery.flot-0.8.1.min.js" type="text/javascript"></script>
<script src="js/jquery.flot-0.8.1.time.min.js" type="text/javascript"></script>
<script src="js/sammy-0.7.6.min.js" type="text/javascript"></script>
<script src="js/json2-2016.10.28.js" type="text/javascript"></script>
<script src="js/base64.js" type="text/javascript"></script>
<script src="js/global.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/prefs.js" type="text/javascript"></script>
<script src="js/formatters.js" type="text/javascript"></script>
<script src="js/charts.js" type="text/javascript"></script>
<script src="js/singular/singular.js" type="application/javascript"></script>
<link href="css/main.css" rel="stylesheet" type="text/css"/>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<script type="application/javascript">
var uaa_logged_in = false;
var uaa_invalid = false;
var auth = JSON.parse(sync_get('/auth'));
enable_uaa = auth.enable_uaa;
uaa_client_id = auth.uaa_client_id;
uaa_location = auth.uaa_location;
if (enable_uaa) {
Singular.init({
singularLocation: './js/singular/',
uaaLocation: uaa_location,
clientId: uaa_client_id,
onIdentityChange: function (identity) {
uaa_logged_in = true;
start_app_login();
},
onLogout: function () {
uaa_logged_in = false;
var hash = window.location.hash.substring(1);
var params = {}
hash.split('&').map(hk => {
let temp = hk.split('=');
params[temp[0]] = temp[1]
});
if (params.error) {
uaa_invalid = true;
replace_content('login-status', '<p class="warning">' + decodeURIComponent(params.error) + ':' + decodeURIComponent(params.error_description) + '</p> <button id="loginWindow" onclick="uaa_login_window()">Click here to log out</button>');
} else {
replace_content('login-status', '<button id="loginWindow" onclick="uaa_login_window()">Click here to log in</button>');
}
}
});
}
</script>
<!--[if lte IE 8]>
<script src="js/excanvas.min.js" type="text/javascript"></script>
<link href="css/evil.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body>
<div id="outer"></div>
<div id="debug"></div>
<div id="scratch"></div>
</body>
</html>
2. nginx – https://hub.docker.com/_/nginx
root@ip-172-31-28-155:/tmp# docker run --name anoop_ngxinx_1 -d -p 8099:80 nginx
51e0871118f5145ee0fe86021cae6bf671952378183f749efc8c84ff05a592a3
root@ip-172-31-28-155:/tmp# docker ps | grep anoop_ngxin
51e0871118f5 nginx "/docker-entrypoint.…" 13 seconds ago Up 12 seconds 0.0.0.0:8099->80/tcp, :::8099->80/tcp
root@ip-172-31-28-155:/tmp# curl http://65.0.3.5:8099/
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
3. fluentd – https://hub.docker.com/_/fluentd
root@ip-172-31-28-155:/home/ubuntu# docker run -p 24224:24224 -p 24224:24224/udp -u fluent -v /path/to/dir:/fluentd/log --name anoop_fluentd_1 fluentd
2021-08-30 12:11:27 +0000 [info]: parsing config file is succeeded path="/fluentd/etc/fluent.conf"
2021-08-30 12:11:27 +0000 [info]: gem 'fluentd' version '1.9.1'
2021-08-30 12:11:27 +0000 [warn]: [output_docker1] 'time_format' specified without 'time_key', will be ignored
2021-08-30 12:11:27 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="out_file: `/fluentd/log/docker.20210830.log` is not writable"
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep anoop_fluentd
3b1f4d356ea6 fluentd "tini -- /bin/entryp…" 20 seconds ago Exited (1) 18 seconds ago anoop_fluentd_1
4. prometheus – https://hub.docker.com/r/ubuntu/prometheus
root@ip-172-31-28-155:/home/ubuntu# docker run -d --name anoop_prometheus-container -e TZ=UTC -p 30090:9090 ubuntu/prometheus:2.25-21.04_beta
Unable to find image 'ubuntu/prometheus:2.25-21.04_beta' locally
2.25-21.04_beta: Pulling from ubuntu/prometheus
ea301a4e9092: Pull complete
5a55ed894fa3: Pull complete
269462602d82: Pull complete
4d5eca9ab579: Pull complete
74c05cedb7b9: Pull complete
c6194ac97e50: Pull complete
f462445e6986: Pull complete
cc485d99e2cd: Pull complete
b63c31bdbccd: Pull complete
Digest: sha256:03936a740851b8786c328e08803a70feaa97731714a8dbe4b709c44366699b0c
Status: Downloaded newer image for ubuntu/prometheus:2.25-21.04_beta
ad2fb4505cbaf0d9780527bcc2fc67cd63acbed6b25319847032ea2049c990e7
root@ip-172-31-28-155:/home/ubuntu# docker ps | grep anoop_prometheus-container
ad2fb4505cba ubuntu/prometheus:2.25-21.04_beta "/usr/bin/prometheus…" 11 seconds ago Up 9 seconds 0.0.0.0:30090->9090/tcp, :::30090->9090/tcp anoop_prometheus-container
root@ip-172-31-28-155:/home/ubuntu# curl http://65.0.3.5:30090/
<a href="/graph">Found</a>.
5. kibana – https://hub.docker.com/_/kibana
root@ip-172-31-28-155:/home/ubuntu# docker network create kibana_network
3b63c8005935925ee5bf53b3626dfa4755a1ba69f0e7a4b55e42f23f81fd6571
root@ip-172-31-28-155:/home/ubuntu# docker run -d --name anoop_kibana_1 --net kibana_network -p 5601:5601 kibana:7.14.0
4933d2a44a670c3519a27e4cff34d5e4126fddba90046b6c5f29ad47051cac03
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep anoop_kibana_1
4933d2a44a67 kibana:7.14.0 "/bin/tini -- /usr/l…" 41 seconds ago Up 40 seconds 0.0.0.0:5601->5601/tcp, :::5601->5601/tcp anoop_kibana_1
root@ip-172-31-28-155:/home/ubuntu# curl http://localhost:5601
Kibana server is not ready yetroot@ip-172-31-28-155:/home/ubuntu#