August 2017
Intermediate to advanced
332 pages
9h 16m
English
We've run our first home-made Docker application. However, what if the execution of the application should depend on some conditions?
For example, in the case of the production server, we would like to print Hello to the logs, not to the console, or we may want to have different dependent services during the testing phase and the production phase. One solution would be to prepare a separate Dockerfile for each case; however, there is a better way, environment variables.
Let's change our hello world application to print Hello World from <name_passed_as_environment_variable> !. In order to do this, we need to proceed with the following steps:
import os print ...
Read now
Unlock full access