How can I set .bash_profile environment variable in Dockerfile?

KiYugadgeter

I want to set bash environment variable in Dockerfile.
How I can do it?

Host: OS X 10.11.4
Guest: ubuntu:latest

Dockerfile:

RUN mkdir ~/gopath_dir
RUN apt-get install ubuntu-make
RUN umake go

# I want to set $GOPATH to ~/gopath_dir
NotBad4U

You can declare a environment variable with the ENV statement

ENV foo=hello

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I set environment variables for GUI apps in OS X Mavericks using .bash_profile?

I have accidentally set up my path environment variable incorrectly using the .bash_profile on macbook. How do I reset it?

How can I set runtime variable for docker compose environment variable

How can I use Python to open "~/.bash_profile"

How can I determine the OS within .bash_profile?

Dockerfile set environment variable with script

How can I check if an environment variable is set in Node.js?

How can I set the helm tiller namespace via an environment variable?

How can I set up the python environment variable on Windows 7?

How can I set an environment variable which contains newline characters?

How can I set an environment variable as gulp task?

How can I set up an environment variable to work with TCC?

How can I consistently set an environment variable for a single program?

How can I set a runtime environment variable based on the value of another

How can I set the environment variable in request header for curl?

How can I set environment variable for another user account in Windows?

Can I set an environment variable on Bash's command line?

Can I use an environment variable in a Dockerfile USER statement?

How do I set an environment variable in the shebang (#!) of a script that will be run by Bash?

In Dockerfile, how to append a value to an environment variable that can exist in base image?

How to use environment variable in Dockerfile?

How can I format a json file into a bash environment variable?

How can I access environment variables declared in Dockerfile?

How can I create a bash environment variable that prefixes an environment variable before a command?

How do I set an environment variable?

Set environment variable in RUN section Dockerfile

How can I exec into a K8s pod but use a bash_profile from outside of it?

How can I open .bash_profile without a command-line editor?

How can I add a rake command alias to OS X .bash_profile?