Cloud Stack Ninja

The ENV instruction sets the environment variable to the value . This value will be in the environment for all subsequent instructions in the build stage


Below instruction:

   ENV PATH=$PATH:$HOME/go/bin

does not append PATH variable

How to append $HOME/go/bin to $PATH? in below docker file

FROM golang:1.14.10
MAINTAINER xyz

ENV GOPATH=

ENV PATH=$PATH:$HOME/go/bin

RUN echo $PATH


Read more here: https://stackoverflow.com/questions/64399802/dockerfile-how-to-append-path-using-env-instruction

Content Attribution

This content was originally published by overexchange at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: