I have been asked to solve a challenge in C++ that works in Linux. I have developed my solution in my MacOS and have created a repo in Github. Moreover to ease the execution of my repo I have created a Dockerfile that configures all packages that need to be installed and so on.
My repo looks like:
UBIMET_Challenge
-- Dockerfile
-- Rest of .cpp files
-- build
My Dockerfile looks like:
FROM rikorose/gcc-cmake
RUN apt-get update && apt-get install -y libpng-dev
RUN git clone https://github.com/hect1995/UBIMET_Challenge.git
WORKDIR /UBIMET_Challenge
RUN mkdir build
WORKDIR build
RUN cmake ..
RUN make
RUN ./ubimet /UBIMET_Challenge/data/1706221600.29 output.csv
Is this a good way to present my work? It is for a job interview :) Moreover, the last line of the Dockerfile should generate 2 files, what I do is after is:
docker build --tag <name_process> .
docker run -t -i <name_process> /bin/bash
Get the ID of the /bin/bash process and export it from the Docker to my local domain as:
docker cp <process_id>:/UBIMET_Challenge/build/heatmap0.png .
Where in this example I copy heatmap0.png to my local domain.
So my questions:
- Can I modify my Docker not to clone the repo as the Dockerfile itself is already inside the same repo?
- How would you make nicer the way to access the data generated by the container in your local domain (Like that files save automatically in the local domain)?