I am trying to build a Docker container which runs 2 external scripts, whenever my Docker daemon parses the lines containing the 'RUN' parameter they don't seem to be doing the install and setup I ask of them.
RUN CMD powershell -Command net user anon Nona /add;
CMD powershell -Command wmic useraccount where "name='anon'"; \
CMD powershell -Command net localgroup User /add; \
CMD powershell -Command 'C:\Users\anon\getGNUPG_ALT.bat > output.log;' ; \
CMD powershell -Command 'C:\Users\anon\getTor.bat' ;
To test this container I am building the image and running it in a container (docker build -rm mycontainer
). Whenever I run the %username%
command I get the containerAdministrator as the output and my batch files have not installed anything.
Is there an issue with my syntax in the DockerFile or could the batch files be the problem?