- Open terminal.
- Go into
bloomon-code-challenge
folder. - You will need to install python 3.7.0.
- Run:
python script.py
- In current (
bloomon-code-challenge
) folder you will see new fileoutput.txt
. It will contain results for this test task.
You can specify input file name and output file name by passing following flags:
--input-file-name
for input file name (default issample.txt
);--output-file-name
for output file name (default isoutput.txt
);
So, you can run following command:
python script.py --input-file-name another_sample.txt --output-file-name another_output.txt
I tested this program on MacOS and I'm not sure how it will work on Windows, for example.
- Open terminal.
- Go into
bloomon-code-challenge
folder. - Run:
It will create docker image.
docker build . --tag bloomon:oleh
- Run:
It will run container, mount volumes and execute program for this test task.
docker run -it --name bloomon-code-olehzorenko --mount src="$(pwd)",target=/app,type=bind bloomon:oleh
- In current (
bloomon-code-challenge
) folder you will see new fileoutput.txt
. It will contain results for this test task.
In Docker you also can specify input file name and output file name by passing following flags:
--input-file-name
for input file name (default issample.txt
);--output-file-name
for output file name (default isoutput.txt
);
So, you can run following command:
docker run -it --name bloomon-code-olehzorenko --mount src="$(pwd)",target=/app,type=bind bloomon:oleh --input-file-name another_sample.txt --output-file-name another_output.txt
In this case, please, remember that you already have container with bloomon-code-olehzorenko
name and if you need to run it again with file names flags, change the name of the container by setting --name
flag to another name, for example --name bloomon-code-olehzorenko-with-flags
.