I need to append to the PATH within a Windows Docker container, and I\'ve tried many permutations.
ENV PATH=%PATH%;C:\\\\Foo\\\\bin
ENV PATH=$PATH;C:\\\\Foo\
Unfortunately ENV
won't work, because windows environment variable work a little differently than linux. more info
As of now the only way to do this is through RUN
But you don't need to create a separate file to do this. This can be done by the following much simpler one line command:
RUN setx path "%path%;C:\Foo\bin"