Docker evn variable not getting set

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Hi guys, I’m new to docker and i’m trying to build a flask app, and i have to pass credentials via env variables, and they won’t get set. Please help! Here is what I do: Build the app: docker build -t simple_python_app . ​ Run the app, trying to pass MAIN_PASSWORD here: docker run -d -p 5000:5000 simple_python_app -e MAIN_PASSWORD=’MY_PASSWORD_HERE’ ​ Then when I try to access it – it’s not there. If I list the env variables with: docker exec 96e3d3543020 printenv it’s not there ​ I tried setting the env variable on the running container with: docker exec 96e3d3543020 /bin/bash -c “MAIN_PASSWORD=’MY_PASSWORD_HERE'” it doesn’t error out, but when I check – the variable is not there. ​ My Docker file is: FROM python:3.7 WORKDIR /web_app COPY . . RUN apt-get update && pip3 install –upgrade pip && apt-get clean && pip3 install -r app/requirements.txt CMD printenv ENTRYPOINT python app/app.py submitted by /u/DrTrax313 [link] [comments]

X ITM Cloud News

Patricia

Leave a Reply

Next Post

The Kubernetes Development Workflow — 3 Critical Steps

Tue Sep 15 , 2020
Spread the love           submitted by /u/dthiry [link] [comments] X ITM Cloud News
X- ITM

Cloud Computing – Consultancy – Development – Hosting – APIs – Legacy Systems

X-ITM Technology helps our customers across the entire enterprise technology stack with differentiated industry solutions. We modernize IT, optimize data architectures, and make everything secure, scalable and orchestrated across public, private and hybrid clouds.

This image has an empty alt attribute; its file name is x-itmdc.jpg

The enterprise technology stack includes ITO; Cloud and Security Services; Applications and Industry IP; Data, Analytics and Engineering Services; and Advisory.

Watch an animation of  X-ITM‘s Enterprise Technology Stack

We combine years of experience running mission-critical systems with the latest digital innovations to deliver better business outcomes and new levels of performance, competitiveness and experiences for our customers and their stakeholders.

X-ITM invests in three key drivers of growth: People, Customers and Operational Execution.

The company’s global scale, talent and innovation platforms serve 6,000 private and public-sector clients in 70 countries.

X-ITM’s extensive partner network helps drive collaboration and leverage technology independence. The company has established more than 200 industry-leading global Partner Network relationships, including 15 strategic partners: Amazon Web Services, AT&T, Dell Technologies, Google Cloud, HCL, HP, HPE, IBM, Micro Focus, Microsoft, Oracle, PwC, SAP, ServiceNow and VMware

.

X ITM