[Chicago-talk] When to Dockerize a perl program

Richard Reina gatorreina at gmail.com
Tue Sep 6 07:31:34 PDT 2022


Great info. Thank you very much.

Richard

El mar, 6 sept 2022 a las 9:17, Sean Blanton (<sean at blanton.com>) escribió:

> Do you manage your dependencies with some type of virtual environment?
> Installing Linux packages is pretty straightforward in the Dockerfile,
> using yum/apt, etc.
>
> Typically, my Dockerfil is arranged like:
>
> use a base Linux distro
> install linux packages
> create and set a userid
> set up virtual env (using Conda)
>
> When running, we supply a conda command that activates the virtual env and
> launches a specific script.  If you don't use a virtual env, you could
> install perl packages in the os, of course, but I always tried to avoid
> that as I consider that the os's perl, not mine.
>
> I think mainly you will have some first time trial and error but you may
> find helpful examples from the web.
>
> Regards,
> Sean
>
> Sean Blanton
> sean at blanton.com
>
>
> On Mon, Sep 5, 2022 at 12:50 PM Richard Reina <richard at rushlogistics.com>
> wrote:
>
>> Sean, Thanks for the insight. Based on what you know how hard would it be
>> to create an image for my program with the amount of dependencies I have?
>>
>> Sent from my iPhone
>>
>> On Sep 5, 2022, at 12:38 PM, Sean Blanton <sean at blanton.com> wrote:
>>
>> 
>> I would say almost every Perl program. It certainly solves the problem of
>> managing your environment. It can run anywhere and you don't care what's
>> installed or upgraded on the server.
>>
>> I'm unfortunately now using the lesser and boring p- language, but the
>> same thing holds.  We have one bitbucket/Gitlab repo and it holds all the
>> common code and we launch the same docker image with different start
>> commands to run different programs as different services.  This had the
>> benefit of not having to upgrade all your services on a new release.
>>
>> Docker was a learning experience for me for sure, but overtime I found
>> many optimizations to iterate quickly. If you are completely not paying
>> attention (newbie), you could end up with a huge docker image that could be
>> unwieldy. I've dabbled in the admin side as well - also some learning
>> there, as a lot of the docker storage is under /var, which like /tmp, users
>> can abuse and max out (but volumes can be created).  The Alpine Linux
>> distribution is popular to keep the image size down.
>>
>> Regards,
>> Sean
>>
>> Sean Blanton
>> sean at blanton.com
>>
>>
>> On Mon, Sep 5, 2022 at 8:58 AM Richard Reina <richard at rushlogistics.com>
>> wrote:
>>
>>>
>>>
>>>
>>> On Sep 4, 2022, at 6:19 PM, Alan Mead <amead at alanmead.org> wrote:
>>>
>>> 
>>>
>>> I was curious to see what responses you got. The little I understand
>>> about docker, it makes it easier for a sysadmin to deploy your application
>>> because you have set up the environment that you need. From that, I assume
>>> that Docker is great for sysadmins but maybe not all that compelling for
>>> the private use of programmers unless it solves a problem for you.
>>>
>>> Yes and I am also the system admin. Accordingly, if turning my app into
>>> an image is something that could allow me to get it up and running on a
>>> machine with no compromises in five minutes as opposed to a couple of hours
>>> I would seriously consider it, especially if making a Docker image does not
>>> require a great deal of work. Right now I only have to occasionally, once a
>>> year or so, install in on a machine in my office so it not too much hassle—
>>> but five minutes vs. a couple hours is worth considering.
>>>
>>> I am surprised that your script takes two hours to run. Does that
>>> include some long compilations?
>>>
>>> The program does not require two hours it only takes about 20 minutes
>>> and most of that time it’s downloading and installing packages and perk
>>> modules. The rest of the time is me mucking with the machine to get
>>> everything working right— my install script only does about 90% of the work.
>>> _______________________________________________
>>> Chicago-talk mailing list
>>> Chicago-talk at pm.org
>>> https://mail.pm.org/mailman/listinfo/chicago-talk
>>>
>> _______________________________________________
>> Chicago-talk mailing list
>> Chicago-talk at pm.org
>> https://mail.pm.org/mailman/listinfo/chicago-talk
>>
>> _______________________________________________
>> Chicago-talk mailing list
>> Chicago-talk at pm.org
>> https://mail.pm.org/mailman/listinfo/chicago-talk
>>
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> https://mail.pm.org/mailman/listinfo/chicago-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20220906/7e2b59cf/attachment-0001.html>


More information about the Chicago-talk mailing list