Héctor Valls
Héctor Valls

Reputation: 26084

Docker is not exporting env var

I have built an image from this Dockerfile:

FROM jenkins

RUN export http_proxy=http://user:[email protected]:port

#more things

But when I enter in the container (via exec /bin/bash), http_proxy is not exported.

What can I do?

Thanks

Upvotes: 1

Views: 104

Answers (1)

xaviert
xaviert

Reputation: 5942

Unless you have a specific reason for using export, Docker has built-in support for using environment variables in a Dockerfile:

ENV http_proxy='http://user:[email protected]:port'

Upvotes: 4

Related Questions