2
tonypolik
12d

I fucking hate debugging Dockerfiles

Comments
  • 1
    Why do you have an issue? you can always run one, and do the steps one by one to debug...
  • 1
    @magicMirror next you tell me the error messages are crystal clear.

    Did I miss a version upgrade?
  • 0
    Dockerfiles are just tiny bash files...

    The real pita is when you start to debug them in your pipelines.
  • 3
    Never had issues with docker files.
    Or at least those issues were until the time I learned how to enter docker image shell, it makes amazingly easy debugging

    docker run -it image_name sh
  • 1
    Using Dockerfiles is the the same as using a script. You can also run the commands interactivly, and commit the changes to a new image as required.
    I used this approach to solve the most annoying problem ever:

    Really old Node based image. Based on debian + fuckton of apt installs + fuckin huge list of node package, that get installed twice fir some reason. full build cycle is over 30 minutes of downloading and installing stuff before failure bc some shit reason. Produced image is 1.5Gb. updateed layers are 600mb bc NPM.
    Changes to this POS legacy code is in a single 1.5Kb js file, that is not transpilled.
    Also - client system uses a 56k modem pull updates. 600mb takes fucking hours!

    Solution to this mess?
    Docker commit. Load the file into previous version using a volume, and create an updated image. build time is 1 sec, upload to client is 2s.
Add Comment