Docker Book: Difference between revisions

From Rixort Wiki
Jump to navigation Jump to search
Created page with "Notes for upcoming book on Docker == Installing Docker == * Point to instructions on Docker website, no point in duplicating these * Make sure you are running the latest ver..."
 
No edit summary
Line 11: Line 11:
* Include example output for checking
* Include example output for checking
* Explain use of <code>--rm</code> flag - without this we end up with lots of stopped but not removed images
* Explain use of <code>--rm</code> flag - without this we end up with lots of stopped but not removed images
== Basic PHP example ==
* <code>docker run --rm php:7.4-apache-buster</code>
Dockerfile:
  FROM php:7.4-apache-buster
  COPY index.php /var/www/html/index.php
index.php:
  <?php phpinfo();

Revision as of 10:04, 3 September 2020

Notes for upcoming book on Docker

Installing Docker

  • Point to instructions on Docker website, no point in duplicating these
  • Make sure you are running the latest version

Hello World

  • docker run --rm hello-world
  • Include example output for checking
  • Explain use of --rm flag - without this we end up with lots of stopped but not removed images

Basic PHP example

  • docker run --rm php:7.4-apache-buster

Dockerfile:

 FROM php:7.4-apache-buster
 COPY index.php /var/www/html/index.php

index.php:

 <?php phpinfo();