Dock Life: Using Docker for All The Things!


Interesting take by the folks at nystudio107: instead of installing things such as Node locally, why not run ‘m all in containers with aliases linked to them?

Instead of installing all of the tools & pack­ages you’re used to using, we use Dock­er images that some­one else has cre­at­ed that con­tain these tools & packages.

In order to seam­less­ly pro­vide access to var­i­ous tools run via Dock­er, we’re going to use shell aliases.

For example, to have node available, set up this alias:

alias node='docker run --rm -it -v `pwd`:/app -w /app node:16-alpine '

With that set up, you can run node install as you’d normally do.

Same can be done for other node versions, npm, composer, deno, …

Dock Life: Using Docker for All The Things! →

Source: Bram Van Damme

November 29, 2021
Category : News
Tags: composer | docker | Elsewhere | Link | node

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.