Reputation: 6241
Using dockerbuild file, how can I do there something like:
export PYTHONPATH=/:$PYTHONPATH
using RUN
directive or other option
Upvotes: 2
Views: 3793
Reputation: 3662
In your Dockerfile
, either of these should work:
ENV
instruction (ENV PYTHONPATH="/:$PYTHONPATH"
)RUN
instruction (RUN export PYTHONPATH=/:$PYTHONPATH && <do something>
)The former will persist the changes across layers. The latter will take effect in that layer/RUN
command
Upvotes: 7