this post was submitted on 04 Feb 2024
75 points (92.1% liked)

Programming

17334 readers
313 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] MonkderZweite@feddit.ch 22 points 9 months ago (2 children)

Dockerizing a shell script?

[–] otl@lemmy.sdf.org 21 points 9 months ago

The art of turning a 500-line text file into a 50MB tarball. Welcome to the future :(

[–] dataprolet@lemmy.dbzer0.com 8 points 9 months ago (2 children)

Yeah, wtf, why would you do that?

[–] domi@lemmy.secnd.me 12 points 9 months ago (1 children)

Environments like Kubernetes only run containers so you would deploy any shell script with containers as well.

[–] Carighan@lemmy.world 2 points 9 months ago (1 children)

But you'd use the shell script as part of something else, surely? As in, it's not a container, it's something deployed as part of or copied into a container?

[–] domi@lemmy.secnd.me 3 points 9 months ago

That depends, we have quite a few images that are just a single shell script or a collection of shell scripts which run as jobs or cronjobs. Most of them are used for management tasks like cleaning up, moving stuff or debugging.

Has the big advantage of being identical on each node so you don't have to worry about keeping those shell scripts up to date with volumes. Very easy to just deploy a job with a debug image on every node to quickly check something in a cluster.

Of course, if the shell script "belongs" to an application you might as well add the shell script in the application container and override the start arguments.

[–] ikidd@lemmy.world 5 points 9 months ago

So you know what your dependencies are.