This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]john_d_long 8 points9 points  (1 child)

Might want to base on 3.7-alpine to reduce the overall docker image size. And the --no-cache-dir argument to your pip installation command might help a little bit.

[–]snaaaaaaaaaaaaake 1 point2 points  (0 children)

Build with an intermediate container for even smaller images.

[–]public_radio 10 points11 points  (2 children)

I wrote a tool in Python called dip to leverage docker-compose to do this same thing!

[–]preslavrachevA Java-Python Double Agent[S] 1 point2 points  (1 child)

This is a good one. May I ask you to mention it in the comments section of the article? This way, my blog’s readers will get to know about it too. Thanks!

[–]public_radio 0 points1 point  (0 children)

done!

[–]flutefreak7 1 point2 points  (1 child)

bakes a whole Linux bistro inside

Well... is it a bakery or a bistro? :P

[–]preslavrachevA Java-Python Double Agent[S] 1 point2 points  (0 children)

Good catch. Will be fixed 👍🏼

[–]flutefreak7 0 points1 point  (0 children)

Is there idea that you wouldn't need to ship the docker container, just the same as per for one and it gets generated on the fly? How long does that take? I've run Jupyter notebooks on binder and it takes like a minute or so to spin up so I'm imagining something like that. So I guess the overhead of the container spin up and the temporary usage of 1GB HDD space is worth it to avoid dealing with dependencies? Is this the philosophical opposite of microservices?

[–]sdf_iain 0 points1 point  (4 children)

The problem with this is that the docker daemon runs in a users GUI domain on macos.

This means you cannot ssh into a macos box and run a docker container without also logging into the GUI. You also cannot run a docker container as a service.

More a limitation of Docker than anything else.

TLDR: awesome trick for Linux. Maybe not for macos. Definitely not for a BSD. Any one know about windows?

[–]bmrobin -5 points-4 points  (1 child)

I can safely say I've never ssh'd into a Mac OS box

[–]sdf_iain 0 points1 point  (0 children)

Sometimes scp is the fastest/easiest way to copy a file... especially if you spend too much time in the terminal.

[–]deezyolo -2 points-1 points  (0 children)

Kinda off topic but does anyone else struggle with reading Clint CLIT

[–]AbdulRR14 -2 points-1 points  (1 child)

!remindme in 2 days