Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How to do it...

As with the LXC section, we're going to start an Ubuntu container, and we're then going to interact with it. 

Begin with the following command:

$ sudo docker run -itd --rm alpine /bin/ashUnable to find image 'alpine:latest' locallylatest: Pulling from library/alpine4fe2ade4980c: Pull complete Digest: sha256:621c2f39f8133acb8e64023a94dbdf0d5ca81896102b9e57c0dc184cadaf5528Status: Downloaded newer image for alpine:latest5396b707087a161338b6f74862ef949d3081b83bbdcbc3693a35504e5cfbccd4

Now that the container is up and running, you can view it with docker ps:

$ sudo docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES5396b707087a alpine "/bin/ash" 45 seconds ago Up 44 seconds ecstatic_lalande

You can also enter it, should ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content