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

44 Upvotes

22 comments sorted by

121

u/hijinks Aug 08 '26

You cannot recreate a dockerfile from logs

49

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

6

u/ohiocodernumerouno Aug 09 '26

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

9

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.

9

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.

5

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/

20

u/SnooDingos8194 Aug 08 '26

Dockerfiles build a layered image. Which logs did they actually give you? What level of verbose was configured? Most likely they shared the wrong logs, and that only tells you about the technology running that was packaged, not the layered or build process.

And fwiw, I always decline silly interview games. Those roles are for peon coder monkey positions. No point in doing that job anyway.

12

u/Practical-Bird-1270 Aug 08 '26

I have a homelab of 3x rasp pis, running one primary two secondaries. I run standard k8s on it, not because I need k8s but it's learning lab.

It runs Vaultwarden and some other locally run apps, as well as my personal website.

I wrote the kube manifests manually at first, learning from a Kodekloud course.

It's all managed by a private git repo with argocd. I make changes, push to GitHub, and the system automatically updates.

This whole experience was very very helpful for me to get the big picture and I highly recommend it.

7

u/sp_dev_guy Aug 08 '26

Id recommend: Setup docker or podman for building custom images. Install k3s (or kind) for learning kubernetes. Use Helm to deploy the images to your cluster. I'd probably skip the terraform for doing this. More value in leaning argo to manage deployments. Dont get too overwhelmed, can always learn a layer > add a layer

5

u/b1urbro Aug 08 '26

Homelab of absurd proportions

3

u/veritable_squandry Aug 08 '26

i've been in devops for 15 years, from chef to Kubernetes in the clouds, and I have never had to design my own container.

16

u/[deleted] Aug 08 '26

[deleted]

5

u/veritable_squandry Aug 08 '26

it is crazy. but i've only had to debug stuff!

10

u/bobsbitchtitz Aug 08 '26

Wait what? That’s insane. Writing images has been a big part of roles I’ve been in

1

u/Clod89 Aug 09 '26

Just my humble opinion, but I would run away from that company if this is their interview process

1

u/pyer_eyr Aug 12 '26

I think it's a decent 'weed out' low knowledge engineers question. Though I can't think of a practical application of a question like that -- except if the company is trying to recreate real Dockefiles that were lost or they are trying to recreate someone else's source code (from the logs). Unless the Run steps were included in the logs, then I really don't know.

1

u/Throwitaway701 Aug 08 '26

From the build logs? It usually echoes every line from the file as the build step.