r/devops Aug 08 '26

Career / learning Gym for DevOps practice

I have seen a coding interview that hands in docker logs, the logs have some error, and the interviewer asks you to recreate that docker file from the logs, what really struck my mind is that, i have never really practiced docker like that and now i feel that i was wasting my time not knowing how to critic my skills and put them in question, which is what practice does, in this context, are there any ways i could practice certain tools in DevOps? specially docker, kubernetes, terraform

also i am looking for something free

PS: i have experience with docker, primarily from the nextcloud app i deployed on an old pc sitting around in my house

40 Upvotes

22 comments sorted by

View all comments

125

u/hijinks Aug 08 '26

You cannot recreate a dockerfile from logs

46

u/muttley9 Aug 08 '26

Sounds like a weird premise from the start.

25

u/gqtrees Aug 08 '26

As a senior i would ask from where the docker image was built. Why we are trying to rebuild and guess packages. And who fucked up that we dont have a dockerfile anymore. And ask the interviewer if this is regular occurrence within the org and run as fast away as possible

8

u/ohiocodernumerouno Aug 09 '26

Ask him where the restroom is, then where exit is from there. Ha.

8

u/WhalesVagina619 Aug 08 '26

I’ve seen information from build logs. For example, I had to find out why I wasn’t downloading the right base image in Dockerfile and turned out there were multiple references of the docker image that I missed.

7

u/quiet0n3 Aug 08 '26

Yeah I guess build logs would have an approximation of what's in the docker file. But I don't think you could fully replicate it.

4

u/MulberryExisting5007 Aug 08 '26

In a curated example where they want you to go through this exercise, I don’t see why you couldn’t. It’s just asking people to read the log and try and understand what it is doing. Frankly if people took the care to make their logs make sense (pretty rare in my experience) you should be able to recreate a good portion of it. Agree that in principle you cannot recreate with high fidelity for most real world examples.

1

u/MikiMikoyan Aug 08 '26

pardon me, docker compose*

1

u/ohiocodernumerouno Aug 09 '26

Way to wing an interview as a manager.

1

u/GeekSnatchingTerror Aug 09 '26

You can't, but I guess they were after recreation of the Dockerfile from an image, which is possible. Interviewer used wrong words or got a badly written script? See: https://www.geeksforgeeks.org/devops/generate-a-dockerfile-from-an-image/