Your Mother has asked for the wisdom of the Perl Monks concerning the following question:

I’ve been playing with the Docker desktop app on Mac and I like it. It is a good high-level GUI—super nice for someone like me who has some hurdles with sysadmin and networking configuration and tools—and the docker docs and tutorials I’ve toured have been quite good. I haven’t much examined the generated files yet so I may be missing some low-hanging fruit for what I want but–

I’m embarking on a big recovery project. Basically restoring and rebuilding the 10 or so websites I made over the last 25 years and maybe the other 20 toys I did along the way. They are in various states of decay or disrepair, source code, language and datastores. My personal environment is quite different from my linode. The test/dev deployment needs to mimic production to be replayable and solid. There is no GUI that is better than solid automation. I expect it will have to be done over and over. Every hand-rolled deployment is an albatross anyway.

So, have any docker-related code or know of tutorials that might cater to my needs?

And since this is 15% stuff that will only run on 5.8 so has to go and 85% greenfield, any recommendations for modern Perl points like version or tools I might have missed that are only lately created or supported? This is more of a shootin’ the breeze question than a “I really need your help” type deal.

  • Comment on Semi-OT: Tips for docker build/deployment with Perl env

Replies are listed 'Best First'.
Re: Semi-OT: Tips for docker build/deployment with Perl env
by kcott (Archbishop) on Jun 14, 2022 at 07:11 UTC

    G'day Your Mother,

    I, too, have just started on such a journey (for $work); it's early days, but maybe some of what I've found so far might be useful. Upfront, I should say that I'm using Debian with a Docker engine installed which I'm accessing via GitLab CI/CD: this may be sufficiently different from Mac with Docker Desktop (which I don't know about) that my help is not helpful — let me know.

    Here's some links:

    I posted "Perl images for GitLab CI" last month. Some of the information there may be useful.

    Something I did find was that images named perl:5.xx gave the latest subversion; e.g. perl:5.16 gave v5.16.3. Mostly, the subversions are backwardly compatible with earlier subversions of the same Perl5 version, so this is fine. I manually went through all of the perldelta* pages for versions from v5.16.0 to v5.36.0 and found three exceptions to this. In addition to all the images from perl:5.16 to perl:5.36 inclusive, I also used the images perl:5.22.0, perl:5.24.0 and perl:5.28.1 to cover the exceptions. I'll leave doing something similar for v5.8 to v5.14 as an exercise for your good self.

    I'll wait to see if any of that is actually useful before attempting to offer further advice.

    By the way, I wondered what the hell was going on with "...duck" as a tooltip for GUI; then I noticed an earlier instance of GUI with a different tooltip — very clever. :-)

    — Ken

      Excellent! Thank you.

      That attribute title is a double pun. It was also for geoduck. :P

Re: Semi-OT: Tips for docker build/deployment with Perl env
by hippo (Archbishop) on Jun 14, 2022 at 08:48 UTC

    While I don't use Docker at all, I do manage some network security and so my one OT tip is to make absolutely sure that you have firewalled off the default Docker ports (TCP 2375, 2376 and 2377). We see so much distributed inbound traffic to these ports that any unprotected Docker instance will surely be pwned in short order.


    🦛

      Great tip. ++

      I’ve told this story before but it bears repeating. It was back in like… 2001? 2003? Somewhere in there. For the first time ever I opened up my home dev webserver to the Internet as an experiment to see if I wanted to host my own sites. I happened to be watching the logs and it was something like… 15 minutes before attacks/probes started to trickle and soon pour in. Big eye-opener for me.

Re: Semi-OT: Tips for docker build/deployment with Perl env
by NERDVANA (Priest) on Jun 15, 2022 at 02:02 UTC
    In addition to the tips above, see Carton, where you declare your dependencies in the cpanfile, then pin specific module versions in the cpanfile.snapshot, and then use Carton during the Docker build to get specific versions installed. This helps you re-create a perfect matching docker container per project.

      Good reminder++. I played around with Carton when it first came out but never had a business need for it because of the way we did deployments but this project could be a candidate for it.