@Raghavendra Balgi thanks for the steps for apache2. The reason I asked was because on Windows there is a problem with shared folders. It is not easy to configure epecially on a corporate host. So I needed an alternative way so check robot output files. I think the apache aproach might be a bit difficult (at least for beginners), too.
I have found two (imho easier) alternatives how to get a look on robots output files:
NOTE: I did all that on Windows 10
docker cp --help
--> Copy files or folders between a container and the local filesystem
docker build -t robot .
NOTE: this will create an image tagged robot
from Dockerfile in current directory
docker create --name robotcontainer robot
NOTE: this will create a container with name robotcon
from our robot image
check it's existence with docker ps -a
docker start -i robotcon
NOTE: instead of B-1 + B-2 you can also do just one command docker run --name robotcon robot
docker cp robotcon:/root/reports/ C:\path_to_your_folder\where-you-want-files-to-be
EXAMPLE: docker cp robotcon:/root/reports/ C:\qs_playground\docker_test\ubuntu
FROM CMD (Xvfb :10 -ac & export DISPLAY=:10; wget -qO- https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | tar -xz -C /usr/bin/; pybot -d /root/reports/ /root/robotframework_test/test.txt)
TO CMD (Xvfb :10 -ac & export DISPLAY=:10; wget -qO- https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | tar -xz -C /usr/bin/; pybot -d /root/reports/ /root/robotframework_test/test.txt; cd /root/reports/; python -m SimpleHTTPServer 9999)
NOTE: here we go to /root/reports/
folder and start Python's HTTP server on port 9999
docker build -t robot2 (give i another tag so that we dont get confused with first alternative)
NOTE: with -p 9999:9999
we are publishing the container's port to our host (Windows 10)
Open youf favorite browser (Google, Firefox, Edge etc.) and got to http://localhost:9999 you should see three robot output files listed
- log.html
- output.xml
- report.html
@raghavendra Balgi I have so much questions ... hope you don't mind me spaming you blog :)))
Why did you put geckodriver download under CMD instead in a RUN command?
I noticed that having it in a RUN speeds up execution a bit.
RUN wget -qO- https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | tar -xz -C /usr/bin/