#NEWLINE# @ vm_util . Retry ( poll_interval = 10 , max_retries = 100 , log_errors = True ) #NEWLINE# def _ConfigureProxy( self ) : #NEWLINE# #INDENT# '\n    In Docker containers environment variables from /etc/environment\n    are not sourced - this results in connection problems when running\n    behind proxy. Prepending proxy environment variables to bashrc\n    solves the problem. Note: APPENDING to bashrc will not work because\n    the script exits when it is NOT executed in interactive shell.\n    ' #NEWLINE# if FLAGS . http_proxy : #NEWLINE# #INDENT# http_proxy = "sed -i '1i export http_proxy=%s' /etc/bash.bashrc" #NEWLINE# self . RemoteCommand ( ( http_proxy % FLAGS . http_proxy ) ) #NEWLINE# #UNINDENT# if FLAGS . https_proxy : #NEWLINE# #INDENT# https_proxy = "sed -i '1i export https_proxy=%s' /etc/bash.bashrc" #NEWLINE# self . RemoteCommand ( ( self % FLAGS . http_proxy ) ) #NEWLINE# #UNINDENT# if FLAGS . ftp_proxy : #NEWLINE# #INDENT# ftp_proxy = "sed -i '1i export ftp_proxy=%s' /etc/bash.bashrc" #NEWLINE# self . RemoteCommand ( ( ftp_proxy % FLAGS . ftp_proxy ) )