Carighan,
@Carighan@lemmy.world avatar

17+ MB for a shell script.

Then asks:

Could we reduce the size further

No. No certainly not. I would see no way to make a 500 lines text file use less than 17 MB of space.

MonkderZweite,

Dockerizing a shell script?

dataprolet,

Yeah, wtf, why would you do that?

ikidd,
@ikidd@lemmy.world avatar

So you know what your dependencies are.

domi,
@domi@lemmy.secnd.me avatar

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

Carighan,
@Carighan@lemmy.world avatar

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,
@domi@lemmy.secnd.me avatar

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.

otl,
@otl@lemmy.sdf.org avatar

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

amju_wolf,
@amju_wolf@pawb.social avatar

This is cool but it’ll be a nightmare to update.

Also, chances are that if you use Alpine the person using your image already has the base layer downloaded, so your image might actually be “bigger” for most people.

eluvatar,

Yeah in a PR I would probably reject this for being too clever. Before clicking I expected the image to start at 100mb or more, but it’s already under 50, who cares at this point?

AnarchistArtificer,

Man, “too clever” is a phrase that always throws me for a loop, even though I understand what is meant by it; over the years, as I grow wiser, I learn to be less clever. Still weird to think of it this way though

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@programming.dev
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines